Re: non-delay mode read from cin

From: Arijit (pal_ari_at_yahoo.co.in)
Date: 11/01/04


Date: 31 Oct 2004 20:31:04 -0800


"richard" <byang1@sbcglobal.net> wrote in message news:<pan.2004.10.31.18.51.00.62900@sbcglobal.net>...
> I am trying to do non-delay mode read from cin, i.e.
> char ch;
> ...
> while( cin.getch(ch) )
> {
> ...
> }
> I want getch to return whenever there is a char typed (not wait till
> a newline is seen).
>
> How do I do this? I am using linux if it matters.
>
> thanks,
>
> ----RICH

Not possible in standard C++. Since you are using linux, check out the
GNU readline library.

-Arijit