I have noticed that many functions take parameters or "flags" like so:
foo(BIG | RED | SWEET);
Where BIG
, RED
, and SWEET
have been #define
'ed earlier in the file such as:
#define BIG 0x1
I want to implement my own functions that take parameters like above but I am worried that OR
ing two numbers together might equal the same result as OR
ing two different numbers. What is the proper way to define these variables so there is no collision?