[C++]一個小疑問如何偵測backspace鍵?

Home Home
引用 | 編輯 小染
2009-09-28 22:41
樓主
推文 x0
在此小弟先打聲招呼
初次來到貴論壇

話說小弟我剛進大一...遇到C++ ..

訪客只能看到部份內容,免費 加入會員



獻花 x0
引用 | 編輯 teldeanmac85
2009-10-06 23:36
1樓
  
使用getch()函式
需引入conio.h 表情

複製程式
#include<stdio.h>
#include<conio.h>

int main(int argc, char* argv[])
{
   int c = getch();

   if( c == 8 ) {
      printf("BackSpace");
   }
   system("pause");
   return 0;
}


獻花 x1