+ 2
Can we run our c++ program without getch()??
It means that what can we do to run our program without getch().
5 ответов
+ 1
getch() is used to hold the screen of output
We can hold screen by initializing a variable that is not used in whole program and in the last of program cin the variable
Then screen or program wait for input of the value of variable
It is correct answer.
+ 3
getch() function is not at all necessary to run a programm. it's motive is to get a single character input from the user at the time of execution
Generally it is used to stop the system from executing the program and exiting the console window in old DOS based compillars (such as Turbo C++)
+ 1
Sahil Kalkal that's only true for old DOS based IDEs. Modern IDEs don't require that, also getch() is no more a standard function in C++.
0
Exactly Arsenic now new compilers doesn't need these. It was the case with Turbo C.