+ 3
Return 0 in C++
what is the essence of writing return 0; at the end of C++ code? I noticed that even if i write return 1; or return 100; the output is still correct.
3 odpowiedzi
+ 6
Ayorinde Akanbi int main() is designated start of c++ code... as it is int, return type of function is int which ask us to return some value...
you can return any int value based on your wish.. General practice is that people return 0 to indicate that code executed okay without any error... negative value return is used to indicate some issue... for example, -1 for file not found, -2 for file access issue...etc..
0
How can I code de Euler number in C++?
0
The Euler number