首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

ESC的键值解决方法

2012-04-02 
ESC的键值ESC的键值应该是27.然后写了下面这段代码。。C/C++ code#include stdio.h#include stdlib.h#in

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 可以

热点排行