hello everybody. the program below uses the kbhit to get a character from the key board.
when i tried to execute the program in Visual C++, the output showed press any key to continue.after pressing a key, i t immediately closed the output window.i want the statements, "you pressed a key" to be printed on the screen after user hits a key..
how can i do it?
Code:int main() { char c; while(kbhit('c')) { printf("you pressed a key"); } return 0; }