Should I use #define, enum or const?
问题 In a C++ project I'm working on, I have a flag kind of value which can have four values. Those four flags can be combined. Flags describe the records in database and can be: new record deleted record modified record existing record Now, for each record I wish to keep this attribute, so I could use an enum: enum { xNew, xDeleted, xModified, xExisting } However, in other places in code, I need to select which records are to be visible to the user, so I'd like to be able to pass that as a single