Definicja funkcji main bez zwracanego typu nie jest zgodna ze standardem C++. Funkcja main musi zwracać typ int. W języku C++ dozwolone są 2 formy (link):
int main() { /*body*/ }
int main(int argc, char *argv[]) { /*body*/ }
W języku C zamiast pierwszej mamy:
int main(void) { /*body*/ }
Instrukcja return w funkcji main jest opcjonalna, jeżeli ją pominiesz zawsze zostanie zwrócone 0:
4) The body of the main function does not need to contain the return statement: if control reaches the end of main without encountering a return statement, the effect is that of executing return 0;