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++ 3.0r4 - <b>kbhit</b> 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>
   #include <stdlib.h>

   int main()
   {
       printf(" Hit any character key when ready\n");
       while(!kbhit())
           { ; }
       printf("\n The key pressed was (%c)\n",getch());
       return EXIT_SUCCESS;
   }

Return Value

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

See Also

   getch, getche



See Also: getch getche

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