Condition question with VC++ 2008
okay i have the following code the first condition produces a warning, and the second doesnt. I am curious as to why it produces a warning in the first place.
Thank you for any insight.
static const int A = 1;
static const int B = 2;
if ( SomeFunc() == ( A || B ) ) // produces warning saying '==' : unsafe mix of type 'int' and type 'bool' in operation
if ( SomeFunc() == (int)( A || B ) ) //no warning due to cast, is there a problem with this?
//do the same thing