0
what does the code '' return 0'' do in c++?
4 Réponses
+ 3
Common misconception : Not in C++, but in main().
In main(), where main() returns an int datatype, return 0 is an exit code used to tell your compiler to stop processing the main function. You can return some other value but werid results may sometimes occur.
+ 1
You can write "void main(){}" instead
0
The integer returned by main in C and C++ is considered the return status of the application. In most OSes 0 is considered a successful return and no problems happened.