When dealing with a bool and assigning an int to it, can I assume that the int is always converted to 1 or 0?
I'm asking this in the context of a case like this where I want to substract bools without doing (bool)?1:0 and use bool directly
int main() {
bool x = 0;
bool y = 2;
int z = y - x;
if(z==1) {
printf("Okay");
} else {
printf("weird");
}
return 0;
}
