fflush(stdin)



Does it do anything? I think it shouldn't. But anyway, I'd like to flush
away all input characters waiting for getch() out of stdin.
.



Relevant Pages

  • Re: fflush(stdin)
    ... away all input characters waiting for getch() out of stdin. ... however compelling herd instinct may be. ...
    (comp.unix.programmer)
  • Re: fflush not flusing stdin!
    ... flush the contents of stdin. ... the stdin is not longer than 80 characters. ... 12.26a How can I flush pending input so that a user's typeahead isn't ... 12.26b If fflush won't work, what can I use to flush input? ...
    (comp.lang.c)
  • Re: Non-blocking gets ?
    ... The puts has the \n so the flush ... Then why does this print command produce output without a call to flush: ... stdin and stdout are linked in this way so that reading from stdin ... triggers a flush for stdout first. ...
    (comp.lang.ruby)
  • Re: getch() allocconsole freeconsole
    ... I am using the "official" solution to fix the printf() code, however getch() ... does not use stdin or stdout, instead it uses the _coninpfh variable as ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Help with scanf
    ... >> Here you need to flush the stdout buffer to ensure that the ... >> prompt is displayed to the screen before you wait for user ... Although many systems do implement a special case that they flush stdout's ... buffer when you read from stdin, it is still required on some systems so ...
    (comp.lang.c)