cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Why 'int' main()?
Why 'int' main()?
Mar 6, 2013 at 12:41am UTC
closed account (
3CXz8vqX
)
... I'm not exactly sure why I'm being forced to return an int of 4 bytes when I could manage with a short int (2 bytes) or heck a char (1 byte).
Could someone explain this for me? ( I know that it's fixed I just wanna know why ).
Mar 6, 2013 at 2:00am UTC
AbstractionAnon
(6954)
Because the standard says so.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1905.pdf
3.6.1.2 ...
It shall have a return type of type int
Topic archived. No new replies allowed.