|= does a bitwise OR, and ^= does a bitwise XOR. It's easiest to explain on a binary level. When you OR 2 bits, if either bit is 1, the result is 1. E.G.
1 | 1 == 1
1 | 0 == 1
0 | 1 == 1
0 | 0 == 0
When you XOR 2 bits, the result is only 1 if only 1 of the bits is 1. For instance
1 ^ 1 == 0
1 ^ 0 == 1
0 ^ 1 == 1
0 ^ 0 == 0
In C/C++ the |= and ^= is similar to += in that
a |= b is the same as a = a | b, and a ^= b is the same as a = a ^ b.
Hope that helps some.
|