No, your explanation is wrong.
所在版块:求学狮城 发贴时间:2003-05-13 14:55

用户信息
复制本帖HTML代码
高亮: 今天贴 X 昨天贴 X 前天贴 X 
Yes, fflush(stdin) does not work.

No, it doesn't work even in C!

The reason is that fflush really does flushing only on output streams, and it ignores input stream. So even in C, you have to manually read input stream in order to flush it.
.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!

Flying @way 吳穎暉
 相关帖子 我要回复↙ ↗回到正文
问一个关于c++ input 的问题。。 我行故我   (939 bytes , 510reads )
多谢kikicoco 和 魅力十足 我行故我   (0 bytes , 177reads )
抛砖引玉 kikicoco   (495 bytes , 214reads )
Yes, it is caused by the return character. 魅力十足   (238 bytes , 273reads )
why fflush(stdio) cannot work?? kikicoco   (0 bytes , 239reads )
Hehe, 魅力十足   (68 bytes , 223reads )
No, your explanation is wrong. Flying   (241 bytes , 153reads )
还以为能兼容... kikicoco   (29 bytes , 166reads )