It is not incorrect to use void main

This is a discussion on It is not incorrect to use void main within the A Brief History of Cprogramming.com forums, part of the Community Boards category; No! void main is neither C++ nor C. It never was and it never will be. The only reason void ...

  1. #31
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    No! void main is neither C++ nor C. It never was and it never will be. The only reason void main may be taught is out of ignorance by the instructor.

  2. #32
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    Cmon, we need a few more pro void-main'ers() and we can turn this thread into God-- v2.0

  3. #33
    Funniest man in this seat minesweeper's Avatar
    Join Date
    Mar 2002
    Posts
    801
    I'm a void mainer!! Int main just sux!! And what's this about undefined behaviour? I define the behaviour of my programs!! And another thing, memory allocation. What's the point in using delete?! If you're running one of my programs you have no need to run anything else, so the system doesn't need back the memory I allocate!! Deleting stuff just takes longer to code.

  4. #34
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220
    Who gives a ****? I don't care if somebody uses void main as long as I never have to edit or root through any of their code.

  5. #35
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    Originally posted by Brian
    Who gives a ****? I don't care if somebody uses void main as long as I never have to edit or root through any of their code.
    So when some iraq programmer writes the "do not fire" program for some deadly iraq missile and uses void main() and it misruns and fires and we all die you won't care?

  6. #36
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Heh heh heh. I just got a funny image of Saddam doing that just to tick us off.

  7. #37
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    Originally posted by Ride -or- Die
    So when some iraq programmer writes the "do not fire" program for some deadly iraq missile and uses void main() and it misruns and fires and we all die you won't care?
    DAM YOU SADDAM!!!

  8. #38
    Registered User LordVirusXXP's Avatar
    Join Date
    Dec 2002
    Posts
    86
    Dont try to defend void main();

    One day, your laziness and not caring about the standard crap will come back to haunt you. Sometime in the future, you'll run a program that uses void main(), and it'll BLOW UP YOUR COMPUTER!
    - Dean

  9. #39
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146
    Originally posted by minesweeper
    I'm a void mainer!! Int main just sux!! And what's this about undefined behaviour? I define the behaviour of my programs!!
    Unless you wrote your own operating system, compiler, and console, no, you don't. If you've read this whole thread, you'd realize how much can go wrong using void main like the instance where someone's computer beeped because of void main.


    And another thing, memory allocation. What's the point in using delete?! If you're running one of my programs you have no need to run anything else, so the system doesn't need back the memory I allocate!! Deleting stuff just takes longer to code.
    Are you really that lazy? Deleting something only takes one line of code for every new you used. Memory leaks are very bad. They may not be causing any problems now in whatever insignificant programs you write now, but if you ever write something larger, they will become an issue.

    I have no clue what you mean by "no need to run anything else". I really hope you never become a professional programmer, because with your bad habits you'll be crashing computers constantly.

    If you want to be a lazy, incompetant, ignorant programmer, I guess that's your right. I just really hope that nothing you program ends up on my computer, because if it does, I'll hunt you down and make you pay.

    You are wrong. You are just plain wrong. ANSI says you're wrong; the creator of C++ says you're wrong; and everyone here is telling you that you're wrong. The fact that you still cling to your void main despite its innate wrongness shows that you are stubborn and ignorant. You'll get nowhere in the world with thinking like that.
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

  10. #40
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    Originally posted by joshdick
    [B]Unless you wrote your own operating system, compiler, and console, no, you don't. If you've read this whole thread, you'd realize how much can go wrong using void main like the instance where someone's computer beeped because of void main.



    Are you really that lazy? Deleting something only takes one line of code for every new you used. Memory leaks are very bad. They may not be causing any problems now in whatever insignificant programs you write now, but if you ever write something larger, they will become an issue.

    I have no clue what you mean by "no need to run anything else". I really hope you never become a professional programmer, because with your bad habits you'll be crashing computers constantly.

    If you want to be a lazy, incompetant, ignorant programmer, I guess that's your right. I just really hope that nothing you program ends up on my computer, because if it does, I'll hunt you down and make you pay.

    You are wrong. You are just plain wrong. ANSI says you're wrong; the creator of C++ says you're wrong; and everyone here is telling you that you're wrong. The fact that you still cling to your void main despite its innate wrongness shows that you are stubborn and ignorant. You'll get nowhere in the world with thinking like that.
    [whisper]It was a joke![/whisper]

  11. #41
    Registered User DeanDemon's Avatar
    Join Date
    Nov 2002
    Posts
    37
    Originally posted by Eibro
    [whisper]It was a joke![/whisper]
    Well good. Anyone too lazy to type a few extra lines to save lots of memory, and is too lazy to type return 0; is an idiot. Laziness like that is only rewarded with a weak program that can have tons of run-time errors.
    -Dean

  12. #42
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146
    Originally posted by Eibro
    [whisper]It was a joke![/whisper]
    Oh, okay. Sorry, but with all the stupidity being spewed forth by some of the posts in this thread, it's tough to tell. People who can be that stubborn and ignorant just really get me fired up.
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 03-05-2009, 09:25 AM
  2. can someone help me with these errors please code included
    By geekrockergal in forum C Programming
    Replies: 7
    Last Post: 02-10-2009, 01:20 PM
  3. saying hello and 1st question
    By darksys in forum C Programming
    Replies: 12
    Last Post: 10-31-2008, 02:58 PM
  4. seg fault at vectornew
    By tytelizgal in forum C Programming
    Replies: 2
    Last Post: 10-25-2008, 01:22 PM
  5. need help with handelling multiple source files
    By DarkMortar in forum C++ Programming
    Replies: 38
    Last Post: 05-26-2006, 10:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21