OT: flushing the input stream in c++

William Hubbs kc5eiv at kc5eiv.ddts.net
Thu Sep 5 15:36:20 EDT 2002

Hi Kirk and all,

I guess I should have written out c plus plus instead of using the plus
sign, sorry about that.

Attached is a very short program that shows what I am trying to do.  I
want the pressenter() function to be able to be sure that there is
nothing on the input stream before it prints the "press enter to
continue" message.

Is there a way to see how many characters are on the input stream so I
know what number of characters to pass to cin.ignore()?


On Thu, Sep 05, 2002 at 01:57:07PM -0400, Kirk Reiser wrote:
> Why do you believe the flush method only works for output streams?
> You can use fflush(stdin); to flush standard in.
>   Kirk
> -- 
> Kirk Reiser				The Computer Braille Facility
> e-mail: kirk at braille.uwo.ca		University of Western Ontario
> phone: (519) 661-3061
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
-------------- next part --------------
A non-text attachment was scrubbed...
Name: enter.cpp
Type: text/x-c++src
Size: 417 bytes
Desc: not available
URL: <http://linux-speakup.org/pipermail/speakup/attachments/20020905/d88a0ff6/attachment.cpp>

More information about the Speakup mailing list