以下摘自ANSI C标准:
An enumeration comprises a set of named integer constant values.
Each distinct enumeration constitutes a different enumerated type.
由此可见,枚举类型必然是整型常量。
枚举类型的本质
本文依据ANSIC标准解析了枚举类型的定义,明确指出枚举类型由一组命名的整型常量值组成,并强调每个不同的枚举构成一种独立的枚举类型。
以下摘自ANSI C标准:
An enumeration comprises a set of named integer constant values.
Each distinct enumeration constitutes a different enumerated type.
由此可见,枚举类型必然是整型常量。
5万+
672

被折叠的 条评论
为什么被折叠?