0
I am using returt value 1or 2 instead of 0
I am using returt value 1or 2 instead of 0 in c++ ,but why there is no error why?
1 Réponse
+ 1
you can return anything as long as it's the same data type of the function. it's a convention to return 0 when there's no error and 1 when there's, but you can return other values and do something when returned.