[quote=引用 4 楼 Kingdeguo的回复:]键盘输入的一开始存放在缓存去,不按回车的话怎么把数据传到没存里
键盘输入的一开始存放在缓存去,不按回车的话怎么把数据传到没存里
[quote=引用 15 楼 Kingdeguo的回复:]假如已经定义了一个 str[1000]的字符数组 for(i=0; i<1000; ++i) { str[i] = getchar(); if( str[i] == ' = ') break; else putchar( str[i]); }
假如已经定义了一个 str[1000]的字符数组 for(i=0; i<1000; ++i) { str[i] = getchar(); if( str[i] == ' = ') break; else putchar( str[i]); }
[quote=引用 9 楼 有恒?无恒??的回复:][quote=引用 8 楼 godke2001的回复:][quote=引用 2 楼 有恒?无恒??的回复:]while ((c = getchar()) != '=') printf("%c", c);
为什么要忽略我和第一楼的答案 https://docs.microsoft.com/zh-cn/cpp/c-runtime-library/reference/getch-getwch?view=vs-2019
[quote=引用 8 楼 godke2001的回复:][quote=引用 2 楼 有恒?无恒??的回复:]while ((c = getchar()) != '=') printf("%c", c);
[quote=引用 2 楼 有恒?无恒??的回复:]while ((c = getchar()) != '=') printf("%c", c);
while ((c = getchar()) != '=') printf("%c", c);
33,311
社区成员
41,784
社区内容
加载中
试试用AI创作助手写篇文章吧