Hey everyone, and happy 4th of July to those who celebrate it! I have a quick, possibly simple question. What is the |= operator in C++? I've been practicing DirectX and I see it a lot, but when I try to google it, I can't find anything. It's probably because searching "C++ |= Operator" and other related searches tends to not recognize the |= in the search, and only returns results like operator overloading tutorials. (If it has to do with operator overloading, i'm going to look pretty silly!)
I know || is the Or operator, and I believe one | is the binary(?) version of the operator, but I can't find the combination of |=.
This post has been edited by Mr_Fraggs: 04 July 2013 - 05:08 PM
In C/C++ there are logical operators like || (or), && (and), and then there are the bitwise operators like | (or), & (and). Any operator can be combined with the equals sign to make it easier for people to use.
Like a = a + b becomes a += b. So instead of having a = a | b you would have a |= b,