This is the mail archive of the
mailing list for the GCC project.
- From: David Rasmussen <david dot rasmussen at gmx dot net>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 21 May 2002 14:52:35 +0200
- Subject: unbuffered input
How do I do unbuffered input with cin in gcc?
I've looked at unitbuf and cin.rdbuf()->setbuf(), but with no luck.
I want cin only to read the characters from the stdin file, that I ask
it to. If I read a character, at most one character is read from the
file. If I do getline(), at most one line is read from the stdin file.
In other words, cin.rdbuf()->in_avail() should always be 0.