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. #16
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    >> just looking at that source would make your eyes bleed

    mmmm gotta looove that eye-bleeding feeling ...

  2. #17
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    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.

  3. #18
    Shadow12345
    Guest
    I am curious to see what you mean, post it!

  4. #19
    Seeking motivation... endo's Avatar
    Join Date
    May 2002
    Posts
    537
    I voted int main( ), last time I wrote code with void main() I received a proper telling off from prelude! It just wasn't worth the risk
    Couldn't think of anything interesting, cool or funny - sorry.

  5. #20
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    how the hell did this trhead get over 100,000 votes???
    PHP and XML
    Let's talk about SAX

  6. #21
    Registered User
    Join Date
    Feb 2002
    Posts
    465
    *takes a break from creating new accounts to vote 'this thread is stupid'*

    whew, this is hard work guys. any help? a few more and we can hit the 5 million mark!
    I came up with a cool phrase to put down here, but i forgot it...

  7. #22
    Much older and wiser Fountain's Avatar
    Join Date
    Dec 2001
    Location
    Engeeeerland
    Posts
    1,158
    Originally posted by Waldo2k2
    how the hell did this trhead get over 100,000 votes???


    Methinks a mod may have been been busy.

    At least it didnt get deleted.
    Such is life.

  8. #23
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Who voted for "this thread is stupid"?
    Just Google It. √

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

  9. #24
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    i can take credit for the extra 3 '9's on the end

  10. #25
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Originally posted by Salem
    > on the Game boy advance the c entry point into a program is void main()
    But that's a freestanding implementation
    See http://www.eskimo.com/~scs/C-faq/q11.12.html

    And before you get all high about how it isn't a real world problem - forget it
    There is one real implementation where void main is provably wrong and fatal
    http://users.aber.ac.uk/auj/voidmain.shtml
    Yes that is exactly right. I'm not advocating the use of void main(). Also, like any other device that doesn't use an operating system, I could make the c entry point int main(). Like the link says "...freestanding implementations are comparatively rare, and if you're using one, you probably know it" so all newbies completely disreguard my mensions of void main.

  11. #26
    Registered User
    Join Date
    Jun 2002
    Posts
    230
    NO offense to anyone but void main is for idiots who cant remember or are just to lazy to write return 0; or return whatever. if you use void main then go use another function.
    C++ Rules!!!!
    ------------
    Microsoft Visual Studio .NET Enterprise

  12. #27
    Shadow12345
    Guest
    I have a better idea. Instead of returning 0, simply return five thousand eight hundred and sixty two trilion multiplied by the multiplicative inverse of pi, divided by the area of a cone with a base area of 16 and a height of 20 billion added to the instantaneous 'velocity' of cheese being pulled into the gravitational pull of the eart, all to the 0 power, minus 1

    EDIT:
    That exhausts my math knowledge, and I don't even seem cool now that i think of it.

  13. #28
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >NO offense to anyone but void main is for idiots who cant remember or are just to lazy to write return 0; or return whatever.
    Especially since standard C++ returns 0 by default if main is defined as returning int and the return statement is omitted. Some arguments are that it's quicker to void main, but with standard C++ you have to type a whole extra character. So much for that argument.

    -Prelude
    My best code is written with the delete key.

  14. #29

  15. #30
    Just a Member ammar's Avatar
    Join Date
    Jun 2002
    Posts
    953
    I think that is the ANSI want it to me int main() just make int main() ... it's that simple

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