11 // We clear the mode, most importantly turn off ENABLE_ECHO_INPUT and ENABLE_LINE_INPUT
12 // This is the same mode as that is set up by getch() when trying to get a char
14 SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE
),0);
17 // We read one char from the input and then return
19 ReadConsole(GetStdHandle(STD_INPUT_HANDLE
),&Buffer
,1,&Count
,NULL
);
22 // We print out this char as an int to show that infact a backspace does count as input
24 _tprintf(TEXT("You printed %c :: "), Buffer
);
25 _tprintf(TEXT("With a value %d :: "), Buffer
);
26 _tprintf(TEXT("Number of chars received %lu :: "), Count
);
27 _tprintf(TEXT("Char equal to backspace %d \n"), (Buffer
== TEXT('\b')));