#include <iostream> int main() { using namespace std; // We can define an enum to represent boolean values. // In this case, keFalse = 0 and keTrue = 1. enum EBool {keFalse, keTrue}; // Create an instance of the type and assign it the value keTrue. EBool eMyBool = keTrue; cout << "Boolean enum value = " << eMyBool << endl; // Output the constant enum values. cout << "keFalse = " << keFalse << endl; cout << "keTrue = " << keTrue << endl; // Keep the console window open. cin.get(); return 0; }
© 20072025 XoaX.net LLC. All rights reserved.