+ 1

About "return 0;"

Why always write "return 0;" in c++ code? Is that essential?

29th Jul 2017, 9:08 AM
Dushyantha Wijesinghe
Dushyantha Wijesinghe - avatar
2 odpowiedzi
29th Jul 2017, 9:13 AM
Dev
Dev - avatar
+ 2
we dont always write return 0. return 0 means the program work well. return 1 means the program worked but with a problem. return 2 means error! but you can return any number that you want.
29th Jul 2017, 9:12 AM
mohamad mahjoob
mohamad mahjoob - avatar