quote:Original post by DerAnged
Umm is this thread C or C++ if its C than ok VOID MAIN() is ok but in C++ Mmain must return an int (which is why gcc gives u an error for void main())
void main() is not really ok in C either. To quote the ISO/IEC 9899:1999 C standard
quote:5.1.2.2.1 Program startup
The function called at program startup is named main. The implementation declares no
prototype for this function. It shall be defined with a return type of int and with no
parameters:
int main(void) { /* ... */ }
or with two parameters (referred to here as argc and argv, though any names may be
used, as they are local to the function in which they are declared):
int main(int argc, char *argv[]) { /* ... */ }