Some C++ compilers allow the main function to have return type void. But doesn\'t the Operating System require int type value returned to specify
void
int
main returning void is accepted for backwards compatibility, but it is not legal.
main
In this case, the exit code will be 0. You can still change the exit code, using exit function.