3.6.1 Main function
….
2 An implementation shall not predefine the
mainfunction. This function shall not be overloaded. It shall have a return type of typeint, but otherwise its type is implementation-defined. All implementations shall allow both of the following definitions of main:int main() { /* ... */ }and
int main(int argc, char* argv[]) { /* ... */ }…. and it continues to add …
5 A
returnstatement inmainhas the effect of leaving the main function (destroying any objects with automatic storage duration) and callingexitwith the return value as the argument. If control reaches the end ofmainwithout encountering a return statement, the effect is that of executing return 0;
attempting to find an online copy of the C++ standard so I could quote this passage I found a blog post that quotes all the right bits better than I could.