ESC的键值
ESC的键值应该是27.然后写了下面这段代码。。
- C/C++ code
#include <stdio.h>#include <stdlib.h>#include <conio.h>int main(){ int c; c=getch(); if(c==27) printf("hello"); else printf("abcd"); getch(); return 0;}
但是无论我怎么按ESC都输不出来hello啊。。
求指导。
[解决办法]
试了你的代码,发现可以。。
[解决办法]
windows7 + vs2010 可以