main() returning void

I was asked the other day why it was a bug or problem that main() returned void instead of int. I had no clue other than when returning an int you get information about possible errors occurred during the program execution.
Can anyone provide more info on this?
Many thanx
The standard requires that main return an int.
That's the crux of the issue.
thanx
i know std c++ requires an int return from main. the question is more like why it is enforced by std c++ to return an int.
http://www.stroustrup.com/bs_faq2.html#void-main

i know std c++ requires an int return from main. the question is more like why it is enforced by std c++ to return an int.
main() is a special case, you are not forced to return anything (that implies return 0;).
Topic archived. No new replies allowed.