你还在上铁榔头的编程班?
#include<bits/stdc++.h> #include<windows.h> #include<conio.h> #include<cstdio> const unsigned char CTRL_KEY = 0XE0; const unsigned char LEFT = 0X4B; const unsigned char RIGHT = 0X4D; const unsigned char DOWN = 0X50; const unsigned char UP = 0X48; using namespace std; int main(void) { int flag = 0; while(TRUE) { if (flag) { switch(getch()) { case LEFT : printf("LEFT\n"); break; case RIGHT : printf("RIGHT\n"); break; case DOWN : printf("DOWN\n"); break; case UP : printf("UP\n"); break; default :
已有账号? 立即登录
我有推箱子