- 1
Why do we use return 0;
3 odpowiedzi
+ 2
Short answer: just put it and forget about it.
Long answer: if you launch your program with another program, the host program can use the return value of your program to do things differently. A return value of 0 means no error, a non-zero value means any error of your choosing. That feature is seldom used, so don't mind that and just put return 0.
0
To add onto Zen's answer, most compilers will add it automatically if it's not there when the code is compiled.
- 1
So as to end the compilation of the programe