//捕捉键值 #include#include int main(){ while(1){ char c1=_getch(); if(!c1){ char c2=_getch(); switch (c2) { case 72: // up printf("upn"); break; case 80: // down printf("downn"); break; case 75: // left printf("leftn"); break; case 77: // right printf("rightn"); break; default: break; } } else { printf("not direcitonn"); } } }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)