I've used the double vertical "||" as the boolean "or" operator. And seen that the "|" is the bitwise or.
However, since I've started working with c++/cli I've noticed it used to separate flags in functions with a single parameter that seem to accept multiple flags.
An example of this would be in msdn's example of the MessageBox() function.
int msgboxID = MessageBox(
NULL,
(LPCWSTR)L"Resource not available\nDo you want to try again?",
(LPCWSTR)L"Account Details",
MB_ICONWARNING | MB_CANCELTRYCONTINUE | MB_DEFBUTTON2
);
What exactly is the operation performed by "|" here?
What is the "|" symbol actually called? (Like the "^" is called a caret, rather than what I knew it as before i programmed, which was "upside down V") :D
The reason I ask is that I'm using the function setWindowPos(), which also accepts flags as parameters. The function declared like so:
BOOL WINAPI SetWindowPos(
_In_ HWND hWnd,
_In_opt_ HWND hWndInsertAfter,
_In_ int X,
_In_ int Y,
_In_ int cx,
_In_ int cy,
_In_ UINT uFlags
);
And I wanted to know whether the flags can be combined in the same way as in MessageBox().
Thanks in advance,
Guy