Re: [LIP] std::cin.readsome(...) and std::cin.rdbuf()->in_avail()

Binand Sethumadhavan <[email protected]>
Newsgroups gmane.user-groups.linux.india.programmers
Message-ID <[email protected]>
On Wed, Dec 03, 2003 at 09:56:58AM +0530, Josy P. Pullockara wrote:
> I do not want to manipulate the stream directly! I just do not want to
> wait for inputs!

I think you need an unbuffered stream. In C/stdio, there is a function
setbuf().

setbuf (stdin, NULL); /* makes stdin unbuffered */

By default, stdin attached to a terminal is line buffered (and attached
to a file, is block buffered).

If this is not what you want, then you probably will have to go the
termios.h way.

Binand

-- 
Linux - It is now safe to power ON your computer.


-------------------------------------------------------
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.