Keypressed exists?
Tris Orendorff
tris at alzabo.uucp
Sun Feb 11 06:00:53 AEST 1990
ron at clarity.Princeton.EDU (Ronald Beekelaar) writes:
>Hi
> I have a very simple question, although I can't find the answer myself. How
>do you quietly test whether any key was pressed on the keyboard? I want to
>write a function that waits 10 seconds, if any key had been pressed, but
>doesn't wait at all, if none was pressed.
In Microsoft C V5.1 you can use the functions kbhit () and getch ().
See section 4.8.3 in the run-time library reference book.
--
Sincerely Yours
Tris Orendorff
tris at alzabo.uucp
-----------------------------------------------------------------------
More information about the Comp.lang.c
mailing list