Thread: main() return value standard - stupid question

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    22
    Quote Originally Posted by robatino View Post
    You never know when someone else will check the return value of your program, even if you don't, so it's a good idea to always put it in (in C, anyway - I leave it out in C++).
    Those were my thoughts (well minus the C++ part since I don't know all of the basics of that language). I was explaining to someone why I thought they should always have a defined return value at the end of their program when someone else said only put it in if you have to so I started arguing with the second person about it. Unpredictable behavior just bugs me.
    Last edited by shuuhen; 09-23-2007 at 01:48 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Union Question
    By estarapapax in forum C Programming
    Replies: 0
    Last Post: 10-21-2008, 10:08 AM
  2. Replies: 8
    Last Post: 03-10-2008, 11:57 AM
  3. Another weird error
    By rwmarsh in forum Game Programming
    Replies: 4
    Last Post: 09-24-2006, 10:00 PM
  4. need help program crashing
    By tunerfreak in forum C++ Programming
    Replies: 14
    Last Post: 05-22-2006, 11:29 AM
  5. problem with open gl engine.
    By gell10 in forum Game Programming
    Replies: 1
    Last Post: 08-21-2003, 04:10 AM