Mega Code Archive

 
Categories / C / Console
 

Use getche() to receive user selection

#include <conio.h> #include <stdio.h> int main(void) {   char ch;   printf("Do you wish to continue? (Y/N : ");   ch = getche();      if(ch=='Y') {    /* continue with something */      }   return 0; }