+ 2
What is the usage of return 0 in c++
#include <iostream> using namespace std; int main() { return 0; } please up like and comment
3 Respostas
+ 7
returns 0?
+ 4
Could indicate 'successful execution' of a function - in main() it often indicates: 'programmer didn't bother to use return codes | compiler defaulted to 0 due to null return | success'.
For truth values, often 0==False.
+ 2
It indicates the end of the program to the compiler.