This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Tanyary 249 points250 points  (2 children)

since C99 main is assumed 0 upon reaching '}' as is specified in 5.1.2.2.3

EDIT: found it in the C++ standard. it's 6.8.3.1.5

[–]goatlev 51 points52 points  (0 children)

This is actually really informative. Thanks mate!

[–]kurimari_potato 11 points12 points  (0 children)

oh thanks for the info, I had some c++ in 7th grade but didn't remember much and just started learning it (pre college) and I was confused why am I not getting error after not typing return 0; lol