假设我只有两个正在设置的标志(bCold 和 bHot)。我发现所有可能的组合都应该相等。那么我怎样才能从下面确定原始(或兼容的)常量是什么?
When bCold and bHot are both turned ON = 0x4100
When bCold and bHot are both turned OFF = 0x8200
If bCold is ON and bHOT is OFF = 0x8100
If bCold is OFF and bHOT is ON = 0x4200
知道了以上内容,我应该将 bCold 和 bHot 设置为相等吗?
#define bCold ((ULONG)0x???)
#define bHot ((ULONG)0x???)
// Turn them on sometime later
long lCONFIG_FLAGS = bCold | bHOT;