📅  最后修改于: 2022-03-11 14:44:53.113000             🧑  作者: Mango
enum Color { red, green, blue };
Color r = red;
switch(r)
{
case red : std::cout << "red\n"; break;
case green: std::cout << "green\n"; break;
case blue : std::cout << "blue\n"; break;
}