I know that in C and C++, when casting bools to ints, (int)true == 1 and (int)false == 0. I\'m wondering about casting in the reverse direction...<
(int)true == 1
(int)false == 0
There some kind of old school 'Marxismic' way to the cast int -> bool without C4800 warnings of Microsoft's cl compiler - is to use negation of negation.
int i = 0; bool bi = !!i; int j = 1; bool bj = !!j;