First key pressed (C++ Console)

Started by
12 comments, last by Oluseyi 18 years, 10 months ago
Quote:Original post by fatnickc
The nearest thing to _kbhit() in my conio.h is int _conio_kbhit(); .
However, I can't use that because that is the only thing said about it. There is nothing where the actual function is written out.
In conio_mingw.h, however, _conio.h is, everything aprt from the actual function being written!


out of interest what is the recommended ansi function? how would i do this in linux (unistd seems to have some stuff but i didn't look much).
Advertisement
No idea. Still need help on finding that _kbhit() function - the bit where we are shown what it actually does. Dev-C++ will obviously kick up a fight if it isn't there, and it does.

[Edited by - fatnickc on June 3, 2005 12:11:43 PM]
---------------------------------Did I hear someone say peanuts?
Can't find a function definition on google either.
---------------------------------Did I hear someone say peanuts?
Quote:Original post by Genjix
out of interest what is the recommended ansi function?
There isn't any. C and C++ don't have any inherent notion of a "console," which is why their I/O routines are implemented in terms of streams and file descriptors. Consoles are platform-specific; your best bet is to use a portable console library like some curses variant.

This topic is closed to new replies.

Advertisement