Possible Duplicate:
return statement vs exit() in main()
I've just read the first chapter of Accelerated C++ (seems like an awesome book), and at the end the author says
However, explicitly including a return from main is good practice.`
Why is this considered good practice? In C99, I always omitted the return 0
, using exit()
to signal abnormal program termination, and never missed the explicit return.