This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to getline when you have used cin >> char?
- From: Jeff Sturm <jsturm at one-point dot com>
- To: weihui qiu <weihuiq at yahoo dot com>
- Cc: gcc at gnu dot org
- Date: Mon, 2 Sep 2002 21:57:51 -0400 (EDT)
- Subject: Re: How to getline when you have used cin >> char?
On Mon, 2 Sep 2002, weihui qiu wrote:
> There is a strange behavior about g++ compiler under
> unix system. When I first cin >> char and then
> cin.getline(char*, int), it don't wait for me to input
> a line, but directly execute the next line. How to
> solve this problem? Please help me!!
Not strange at all. Read about stty and raw vs. cooked tty input.
Your question is off-topic for this list since it has nothing to do with
development of g++.
Jeff