Has anyone ever tried to make this a data type besides int or void? Like this:
char main()
double main()
Has anyone ever tried to make this a data type besides int or void? Like this:
char main()
double main()
What will people say if they hear that I'm a Jesus freak?
What will people do if they find that it's true?
I don't really care if they label me a Jesus freak, there is no disguising the truth!
Jesus Freak, D.C. Talk
-gnu-ehacks
NO!!!!
The ANSI standard for the main function is:-
int main(int argc, char *argv[])
ie returns an integer. This is why the main function always terminates with return 0;
a lot of compilers allow you to miss out the return data type and just declare main(), and some compilers (wrongly) allow you to declare main as void.
I suspect that if you tried to return a character (if it got past the compiler) the os would interpret it as an integer and throw up an error message.
Homer
D'OH!
mmmmmmmm... iterations