What does the vertical bar ( | ) mean in C++?

Bitwise OR operator. It will set all bits true that are true in either of both values provided. For example CS_HREDRAW could be 1 and CS_VREDRAW could be 2. Then it’s very simple to check if they are set by using the bitwise AND operator &: #define CS_HREDRAW 1 #define CS_VREDRAW 2 #define CS_ANOTHERSTYLE 4 … Read more