Working of getch() function in C++


The function getch() gets a character from console but does not echo(print) to the screen. getch() reads a single character directly from the keyboard, without echoing to the screen. For this functionality we can use this function to hold output window until hit any key from keyboard.

In the program, when we press any key from keyboard we’ll see the next line but won’t see the key which is pressed. For the last getch() function, the output window will be held until press any character for keyboard.


Author Description


Our mission is to bring the affordable Technology education to people everywhere, in order to help them achieve their dreams and change the world. - Follow @program_guide

No comments yet.

Join the Conversation