From: "David May" Organization: Albuquerque T-VI To: invid AT dmv DOT com Date: Tue, 21 Jan 1997 12:58:00 -0700 Subject: Re: getch() and getche() CC: djgpp AT delorie DOT com Message-ID: > i don't no if NE1 else has noticed this but there is a very annoying > featire with getch() and getche(). as a newbie i'd much appreciate NE1 > who could point out how to fix it. > > Here's the problem. > > --code segment-- > cout << "Y for yes or N for No: "; > answer = getche(); > ...... > --end-- This has to do with buffering of the I/O. I don't know how to fix it using standard streams for C++, but for C I/O, use fflush (stdout) after the prompt "Y for yes or N for No: " is printed. Alternately, you can use the console (conio.h) I/O functions. Hope this helps. David May, ID Card Administrator Albuquerque TVI