Enter键在不同函数的字符识别的差别

Enter键在不同函数的字符识别的差别 C语言在一般的字符串识别中,Enter键一般都被认为是换行符号来识别的(’\n’); 如getchar()函数 但当使用conio.h文件中的getch()函数时,Enter键会被识别成回车键,即为’\r’ #include <stdio.h> #include <conio.h> int main() { char ch; ch = getcher();
相关文章
相关标签/搜索