getch problem
| QWERTYman (255) | ||||
Interestingly, here is the output:
This is not expected. Any ideas? | ||||
| Duoas (1595) | |||
| It is because <conio.h> is ancient, and it is clashing with the DOS terminal emulator's handling of such requests -- The windows console does that when switching back and forth between line-buffered and unbuffered input. Alas. | |||
| QWERTYman (255) | |||
| Well, any known ways to do unbuffered input with a different header file? | |||
| mahlerfive (117) | |||
| I don't see the problem... the output you got is what is expected.. You call the function twice, both times the user entered "n", so both times it returned false. | |||
| Duoas (1595) | |||
| Use Curses. PDCurses (DOS, Win32, etc) http://pdcurses.sourceforge.net/ NCurses (POSIX) http://www.gnu.org/software/ncurses/ The MinGW suite has a precompiled pdcurses package you can simply download and unpack. You should remember this too http://www.cplusplus.com/forum/beginner/1988/page2.html#msg10636 Remember, mixing line-buffered and unbuffered input in a single program confuses users. Hope this helps. | |||
| QWERTYman (255) | |||
| Oh, mahlerfive. Stupid me. | |||
This topic is archived - New replies not allowed.
