I think I understand what you're trying to do... The WinAPI uses lots of variables like this... where one bit represents the true / false status of something. The way it's done in the API, all 32 variables are pre-defined in the header. So, the programmer doesn't even have to worry about which bit he's working with! Still, you need to be fairly comfortable with bitwise operators.
In your case, you'll have to initialize the variables (constants, actually). You can use bit shifting (recommended), or initialize them manually. If you do it manually, use hex... it's a pain with decimal.
const int ConditionFlag1 = 1; // bit 0
const int ConditionFlag2 = 2; // bit 1
const int ConditionFlag3 = 4; // bit 2
const int ConditionFlag4 = 8; // bit 3
... etc.
Note that bits are counted starting at "bit 0". So in the above scheme, bit 0 represents Condition 1.
Code:
//Set Condition 1 and Condition 3 true, all others false
int Status = ConditionFlag1 | ConditionFlag3; // Status = 5, bits 0, 2 are high
// Set Condition 2 true without affecting other flags
Status = Status | ConditionFlag2; // Status = 7, bits 0, 1, 2 high
// Test Condition 2
if (Status & ConditionFlag2)
cout << "Condition 2 is TRUE!" // Bit 1 is high
//Clear Condition 2 without affecting others
Status = Status & (~ContitionFlag2); // Force bit 1 low.
Be careful. An int is not always 32 bits. In order to write good portable code, you have to make use of sizeof() or <limits>.