I am not able to flush stdin

后端 未结 7 1918
孤城傲影
孤城傲影 2020-11-22 14:51

How to flush the stdin??

Why is it not working in the following code snippet?

#include 
#include 
#i         


        
7条回答
  •  迷失自我
    2020-11-22 15:00

    From the comp.lang.c FAQ, see:

    • How can I flush pending input so that a user's typeahead isn't read at the next prompt? Will fflush(stdin) work?
    • If fflush won't work, what can I use to flush input?

提交回复
热议问题