定义枚举有三种类型
1、
//定义一种枚举类型
enum Season {spring,summer,autumn,winter};
//定义一个枚举变量S
enum Season s = winter;
2、
//定义枚举类型的同时定义一个枚举变量s
enum Season {spring,summer,autumn,winter} s = spring;
3、enum {spring,summer,autumn,winter} s = summer;