enum Color { red, green, blue }; Color r = red; switch(r) { case red : std::cout << "red "; break; case green: std::cout << "green "; break; case blue : std::cout << "blue "; break; }