Tag: visual-studio
-
Logical vs. bitwise operators. Both are wrong?
11 When I use the following minimal code in an c++ ConsoleApp in VS2019, I get two warnings, which are completely opposite. int main() { unsigned char op1 = 0x1; unsigned char op2 = 0x3; unsigned char result1 = op1 | op2; unsigned char result2 = op1 || op2; } The warning at unsigned char…