- 2
Why i am writing return 0, why not write getch ????
3 Respostas
+ 9
I'm just going to assume that you were taught to write pre-standard C++ (which contains void main, conio.h, getch, etc) and just in case it is true:
https://www.sololearn.com/Discuss/288609/?ref=app
+ 4
It's just how C++ relays the exit status to your OS. 0 means it exited successfully, and 1 means it failed. This is good for being able to properly display errors as the program terminates.