Wouldn't it just depend on your rogram? wheather u want main() to return a value or not.
int
void
this thread is stupid
Wouldn't it just depend on your rogram? wheather u want main() to return a value or not.
>Wouldn't it just depend on your rogram? wheather u want main() to return a value or not.
If you don't want to return a value then use the default of 0. But main must return an int (unless it's a freestanding implementation, but we've already established that if you aren't sure, you aren't freestanding).
-Prelude
My best code is written with the delete key.
Newbies with old programming books... not covering standard c++ will surely... love. void main() but one who even visited this board frequently will surely be familier with Salem's Avatar.
Last edited by jawwadalam; 11-16-2002 at 08:31 PM.
One day you will ask what more important to you..
I will say my life..
and You will leave me with even knowing
that
You are my Life (L)
What does the operating system do when it receives a return value other than zero? I.e. what would it do differently if it had received a zero from the terminating program.
Be a leader and not a follower.
public static void ... wait, wrong board.
You BEAN!Originally posted by beege31337
public static void ... wait, wrong board.
i believe game boy advance is a freestanding implementation, yes?Originally posted by master5001
Whahahah I voted for void!!! On a side note, on the Game boy advance the c entry point into a program is void main() so it isn't always the evil plague that some would lead you to believe (like Salem for instance).
That aside I did vote "void main" to be an ass. int main is actually standard.
hello, internet!
Think really, really hard.Originally posted by Waldo2k2
how the hell did this trhead get over 100,000 votes???