为什么getch函数输入字母需按回车键,输入数字则不需要
#include <stdio.h>
#include <stdlib.h>
int main()
{
char a;
a=getch();
return 0;
}
什么编译器?
你程序本身有一个小问题
getch()是conio.h中定义的,头文件必须有
#include <conio.h>
我的测试程序是正常的,应该是你编译器或开发工具的问题
上一篇:c语言宏定义问题!求详解
热门标签:
#include <stdio.h>
#include <stdlib.h>
int main()
{
char a;
a=getch();
return 0;
}
什么编译器?
你程序本身有一个小问题
getch()是conio.h中定义的,头文件必须有
#include <conio.h>
我的测试程序是正常的,应该是你编译器或开发工具的问题
上一篇:c语言宏定义问题!求详解