+ 2
is it really necessary to put return 0 at the and of a int main()?
6 Answers
+ 10
no, you can put any number you want, 0 is usually used to show that you program made sucesfull end
+ 10
i can see that here on sololearn compiler don't show any error if you delete return statment...
+ 5
As pointed out by Jamie, Vukan, and in reference to:
http://www.stroustrup.com/bs_faq2.html#void-main
"... In C++, main() need not contain an explicit return statement. In that case, the value returned is 0... "
+ 3
thanks
0
thx everyone