When we nid to use fflush(stdin) n why we nid to use it?
Last edited on
You don't need to use it.
.......when and why we nid to use fflush(stdin) in c ++?
> When we nid to use fflush(stdin) n why we nid to use it?
It is not a question of need. Even if you need it, you can't use it.
fflush(stdin)
results ion undefined behaviour.
fflush()
can only be used on output streams, or input/output streams on which the most recent operation was not an input operation.