The conio library

Started by
11 comments, last by bioagentX 21 years ago
kbhit() Means Keyboard Hit. It returns non-zero if a key is pressed.

IIRC, randomize() is also not equivolent to rand(). I believe it is equivolent to srand().

bioagentX, stdin means Standard Input - it is, in your case, the console window. It means that the text that is being read is the text that the user is typing.

The entire conio.h header is not standard as well. Nor is iostream.h. You can replace iostream.h with the standard header, <iostream> however.


Qui fut tout, et qui ne fut rien
Invader''s Realm
Advertisement
getch -> getchar.
You''re also using old console output functions, for which you''ll need [n]curses or the like.
E8 17 00 42 CE DC D2 DC E4 EA C4 40 CA DA C2 D8 CC 40 CA D0 E8 40E0 CA CA 96 5B B0 16 50 D7 D4 02 B2 02 86 E2 CD 21 58 48 79 F2 C3
conio isn't standard.

randomize() -> srand()
kbhit() -> select() on stdin ( stdin is fd 0, stdout is fd 1, stderr is fd 2 )
getch() -> ncurses library, or win32 console API, or kbhit + getc


[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ]

[edited by - Fruny on March 31, 2003 6:44:50 AM]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan

This topic is closed to new replies.

Advertisement