enum

enum可以为定义很多变量,显得很规矩。且成员变量外部可以直接使用。

//常用下面两种形式

//////////////////////////int hahaha=c;(可以直接使用c)

////////////////////////typedef enum student{ a,b,c}student_t;(主要用于返回值类型)

enum student

{

a =0,

b,

c,

}

enum

{

a=0,

b,

c

}

原文地址:https://www.cnblogs.com/tiange-137/p/14694710.html