【数据结构】枚举enum范例



typedef enum
{
PERMISSION_RESERVE = 0, //保留
PERMISSION_ALLOWED = 1,   //允许
PERMISSION_DENY = 2, //禁止
PERMISSION_READ_ONLY = 3 //只读
}PERMISSION_TYPE;


typedef enum
{
INTERFACE_TYPE_NULL = 0,
INTERFACE_TYPE_FIREWARE = 1,
INTERFACE_TYPE_IR = 2,
INTERFACE_TYPE_PCMCIA = 3,
INTERFACE_TYPE_PS2 = 4,
INTERFACE_TYPE_USB = 5,
INTERFACE_TYPE_SERIAL = 6,
INTERFACE_TYPE_PARTPORT = 7,
INTERFACE_TYPE_OTHRE = 8,
MAX_INTERFACE_RULE=20

}DEV_INTERFACE_TYPE;


enum一般是定义指定变量范围的数字。


你可能感兴趣的:(数据结构与算法)