+ 1
Is return and return 0 are same
3 ответов
+ 1
tq
0
in main function return 0 or exit(0) are same but if you write exit(0) in different function then you program will exit from that position. returning different values like return 1 or return -1 means that program is returning error . ... But destructors are called if return 0 is used.
https://cboard.cprogramming.com/cplusplus-programming/170281-return-0;-return-1;.html