C++(11):枚举类_风静如云的博客-CSDN博客_c++11 枚举类
介绍了枚举类使用的好处。
不过如果直接输出枚举类的值是不行的:
#include <iostream> using namespace std; int main() { enum class Color{red, green, blue}; cout<<C