C standard stipulates: The return value type of the main function should be defined as int type.
C 98 defines the following two ways of defining the main function:
int main( ) int main( int argc, char *argv[] )
The return value type of the main function must be int. If there is no return statement at the end of the main function, C 98 stipulates that the compiler should automatically add return 0; to the generated object file.
The above is the detailed content of What is the return value type of main function in c++. For more information, please follow other related articles on the PHP Chinese website!