枚举声明存在于不适当的上下文中。
An enumeration declaration exists in an inappropriate context.
只允许在主程序块、类、包或函数内部使用枚举声明。
Enumeration declarations are allowed only in the main program block, inside classes, inside packages, or in functions.
在常量表达式,比如枚举型常量、位域的宽度或是静态变量的初始值,是不允许使用在这种声明中的。
Embedded statements are not allowed in constant expressions, such as the value of an enumeration constant, the width of a bit-field, or the initial value of a static variable.
应用推荐