int main ()
An int that represents the return value in C, or a return value that is not explicitly given, the default is int; () means that any arguments are accepted, and main (void) indicates that no arguments are accepted. Main (), int main (), main (void)//c89 available
The return value must be explicitly given in C + +, and he does not have a default return value; () indicates that no arguments are accepted. int main (int argc, char *argv[]);
void Main ()
Indicates that no value is returned. This is not defined in both C and C + +, but some compilers support this format. The return value of main is int.
Return statement
When the program does not give this statement, some compilers automatically add it.
In the latest C99 standard, only the following two definitions are correct:
int main (void)
int main (int argc, char *argv[])
The following two types of main functions are defined in c++98:
int main ()
int main (int argc, char *argv[])
return value of 59>>main