Detecting non-blocking key.

This sample allow to detect keyboard entry without blocking the program.

kbhit,getch

See version :

Pas de dépendances

Download :

#include <stdio.h>
#include <conio.h>

int main()
{
    int i=0;
    printf("Appuyez sur une touche pour quitter. Moi pendant ce temps, je compte...\n");
    while(!kbhit())
    {
        printf("%d\r",i++);
    }
    getch();
    printf("Fini !\n");
    return 0;
}




Explanations

	No explanations yet.