-
Quote:
Originally posted here by lepricaun
well, i did a little research, and as you can see, it is preffered to use main(void) if not using arguments.
It is not incorrect (nor will you get any warnings) if you use int main() over int main(void), which was the point I made in the first place. It might be preferred by some people but that's just like saying I prefer to put my curly braces on lines of their own whereas other people don't.
-
well i wouldn't trust it since it is possible that a compiler might complain..
but that's everyone's own choice, i just prefer main(void) over main(), (this also goes for all other functions that have no arguments).
and i also prefer this code:
Code:
#include <stdio.h>
int main(void)
{
printf("Hello World!\n");
return 0;
}
over this code:
Code:
#include <stdio.h>
int main(void){printf("Hello World!\n");return 0;}
although both are the same...