|
发表于 2018-10-15 11:16:26
|
显示全部楼层
本楼为最佳答案
你这个旧版的吧?新版的好像没有这个限制
You can use the enumerated type to declare symbolic names to represent integer constants. By using the enum keyword, you can create a new “type” and specify the values it may have. (Actually, enum constants are type int ; therefore, they can be used wherever you would use an int .) The purpose of enumerated types is to enhance the readability of a program. The syntax is similar to that used for structures. For example, you can make these declarations:
enum 就是 int,只不过在输入的时候,允许特定的字符形式~ |
|