I have two enums in my code:
enum Month {January, February, March, April, May, June, July,
August, September, October, November, December};
enum Shor
In C++11 you can use scoped enumerations to fix this this. This will remove the names from the global scope and scope them to the enum name.
enum class Identity
{
UNKNOWN = 1,
CHECKED = 2,
UNCHECKED =3
};
enum class Status
{
UNKNOWN = 0,
PENDING = 1,
APPROVED = 2,
UNAPPROVED =3
};
int main ()
{
Identity::UNKNOWN;
Status::UNKNOW;
}
Live Example