Operators in C++
According to C/C++ operators list there is no operator such as =!. However, there is an operator != (Not equal to, Comparison operators/relational operator)
There are two possibilities.
- It could be typo mistake as I've noticed that
=! operators is in if statement and someone is trying to type != instead of =! because != is the comparison operator which returns true or false.
- Possibly, the developer was trying to assign the boolean negation of
b to a and he/she has done a typo mistake and forgot to put a space after equal sign. This is how the compiler interprets it, anyways.
According to Operator precedence in c++:
- Operator Logical NOT (
!) precedence is 3 and Associativity is Right-to-left
- Operator Direct assignment (=) precedence is 16 and Associativity is Right-to-left