View Single Post
  #6 (permalink)  
Old 07-07-2007, 02:21 PM
Konr Konr is offline
Novice
Join Date: Jul 2007
Posts: 10
iTrader: (0)
Konr is on a distinguished road
The C++ language definition requires that main return an int. To do otherwise is incorrect C++, but many compilers allow it for various reasons, such as tradition, backwards-compatibility and because allowing it extends the language in a way that doesn't affect any other part of it.

It is customary for the return value to indicate success, usually by returning zero, or to give an error code that can be used to debug.

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
The Following 2 Users Say Thank You to Konr For This Useful Post:
HelloWorld (07-07-2007), TeraTask (07-07-2007)