+ 3
What is the real use of getsch.....
3 Answers
+ 15
getch() is actually used to read a single byte character from keyboard input without needing to press ENTER key. In past programs, getch() has been used to hold program execution (pause screen until a key is hit), but the function is now obsolete. Use getchar() instead.
I think VS still supports getch(), but you have to do _getch() instead. E.g.
int ASCII_num;
ASCII_num = _getch();
std::cout << ASCII_num;
+ 9
You may refer to this thread for alternatives:
http://stackoverflow.com/questions/9386651/pause-screen-at-program-completion-in-c
+ 2
yeah ....yes my mean getch ...thanks Alesso to remind me that .......
it real use is that
today's generation computer in very ..so if we don't use the getch in programming it shows the result very fast ...which is not possible to see...
if we use the getch it hold the result .and make the to see...
and we know that in getch we enter the value but no show .......and go back to program...
thank you...