return 0; question

I was informed that C++ already did this by default so theres no need to put it.
Is this correct or do i still need to include it in my program. My program works fine without it sooo???
Last edited on
main() implicitly returns 0 when it reaches the end. However, that is not true for any other function.
so if i were to make another function i would need to include this?
Only if it returns an integral value and you actually want to return 0...
In functions that do not return void, you must exit the function with return (not counting program termination and exceptions).
Topic archived. No new replies allowed.