Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - kbhit http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   kbhit

   Usage
   #include <conio.h>
   int kbhit(void);

   Description
   The kbhit function checks if a keyboard key has been pressed.

   Example
   #include <stdio.h>
   #include <conio.h>
   main()
   {
        printf(" Hit any character key when ready\n");
        while(!kbhit());
             printf("\n The key pressed was (%c)\n",getch());
   }


   Return Value
   Returns non-zero if key pressed, otherwise it returns 0.


See Also: getch getche

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson