int main(void) whatever!

This is a discussion on int main(void) whatever! within the C Programming forums, part of the General Programming Boards category; I always use main() instead of int main(void) in my programs, and I never receive any errors. Anyway, I want ...

  1. #1
    Un Artiste Extraordinaire volk's Avatar
    Join Date
    Dec 2002
    Posts
    357

    Cool int main(void) whatever!

    I always use main() instead of int main(void) in my programs, and I never receive any errors.

    Anyway, I want to know if anyone would recommend me to stop using main() even though it doesn't cause any errors.

    While I'm at it, I never put return 0; at the end of my programs either.

    Will I have to give up my evil ways if I'm to ascend to C++ programming?

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    The 2 languages have different requirements. You should learn to use the correct method for both. If you don't know what they are, do a search, it's been discussed too many times already.

    Sorry, but I won't let this thread run into another void/int main argument, which is what is bound to happen, so I'm going to close it. Any problems/questions, drop me a PM.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. can some one please tell me the cause of the error ?
    By broli86 in forum C Programming
    Replies: 8
    Last Post: 06-26-2008, 08:36 PM
  2. Moving Average Question
    By GCNDoug in forum C Programming
    Replies: 4
    Last Post: 04-23-2007, 11:05 PM
  3. getting a headache
    By sreetvert83 in forum C++ Programming
    Replies: 41
    Last Post: 09-30-2005, 05:20 AM
  4. Half-life SDK, where are the constants?
    By bennyandthejets in forum Game Programming
    Replies: 29
    Last Post: 08-25-2003, 11:58 AM
  5. Quack! It doesn't work! >.<
    By *Michelle* in forum C++ Programming
    Replies: 8
    Last Post: 03-01-2003, 11:26 PM

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