View Poll Results: int main or void main?

Voters
1000006054. You may not vote on this poll
  • int

    37 0.00%
  • void

    11 0.00%
  • this thread is stupid

    1,000,006,006 100.00%

Thread: int main or void main?

  1. #31
    Mmm. Purple.
    Join Date
    May 2002
    Posts
    154
    Wouldn't it just depend on your rogram? wheather u want main() to return a value or not.

  2. #32
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >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.

  3. #33
    Registered User jawwadalam's Avatar
    Join Date
    May 2002
    Posts
    131
    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)

  4. #34
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Heh well, here's a link to Salem's avatar:

    Avatar
    Last edited by Hunter2; 11-17-2002 at 01:49 PM.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  5. #35
    Registered User subdene's Avatar
    Join Date
    Jan 2002
    Posts
    367
    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.

  6. #36
    booyakasha
    Join Date
    Nov 2002
    Posts
    208
    public static void ... wait, wrong board.

  7. #37
    Registered User
    Join Date
    Nov 2002
    Posts
    3
    Originally posted by beege31337
    public static void ... wait, wrong board.
    You BEAN!

  8. #38
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    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.
    i believe game boy advance is a freestanding implementation, yes?
    hello, internet!

  9. #39
    Registered User
    Join Date
    Nov 2002
    Posts
    9
    Originally posted by Waldo2k2
    how the hell did this trhead get over 100,000 votes???
    Think really, really hard.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 03:06 PM
  3. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  4. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  5. Quack! It doesn't work! >.<
    By *Michelle* in forum C++ Programming
    Replies: 8
    Last Post: 03-02-2003, 12:26 AM