man g++ sagt dazu:
Code:
-Wmain
Warn if the type of main is suspicious. main should be a function with external linkage, returning int, taking either zero arguments, two, or three arguments
of appropriate types. This warning is enabled by -Wall.
Es emfpielt sich übrigens, den g++ mit -Wall aufzurufen, damit er viel anmeckert.
Gültige Prototypen für main sind also
Code:
int main()
int main(int argc, char* argv[])
int main(int argc, char* argv[], char *envp[])(*)
Einfach ein return 0 ans Ende und die Warnung ist weg.
Gruß
L00NIX
(*) Quelle: http://msdn.microsoft.com/library/de...tm/impdf_3.asp
Lesezeichen