Expression must be a modifiable lvalue
The assignment operator has lower precedence than &&, so your condition is equivalent to: But the left-hand side of this is an rvalue, namely the boolean resulting from the evaluation of the subexpression match == 0 && k, so you cannot assign to it. By contrast, comparison has higher precedence, so match == 0 && k == m is … Read more