You can use the != operator instead of the XOR in C++,
i.e. (a XOR b) is equivalent to (a != b) assuming a and b are boolean operands