Casting int to bool in C/C++
0 values of basic types (1)(2)map to false. Other values map to true. This convention was established in original C, via its flow control statements; C didn’t have a boolean type at the time. It’s a common error to assume that as function return values, false indicates failure. But in particular from main it’s false … Read more