I am not able to flush stdin

后端 未结 7 1957
孤城傲影
孤城傲影 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:13

    How to flush the stdin??

    Flushing input streams is invoking Undefined Behavior. Don't try it.

    You can only flush output streams.

提交回复
热议问题