#include<iostream>
#include<cstdlib>
#include<conio.h>
#include<windows.h>
using namespace std;
int main()
{
char c;
while(1)
{
Sleep(100); // in <Windows.h>
cout << "按下按鍵" << endl;
c = getch(); // in <conio.h>
cout << "你按的按鍵是:" << c << endl;
system("pause");
cout << "plz wait for cls...\n";
system("cls");
}
return 0;
}
歡迎光臨 竹園論壇 (http://forum.tfcis.org/) | Powered by Discuz! X3.2 |