enum eTaskType{
TYPE_UNKOWN,
TYPE_ADD,
};
or
typedef enum eTaskType{
TYPE_UNKOWN,
TYPE_ADD,
}TaskType;
假如有上述枚举,或者其他定义方法,如何才能通过枚举变量或枚举类型访问成员(通过. -> ::等方式),比如:
TaskType.TYPE_ADD
大家讲道理2017-04-17 11:53:12
Whether it is eTaskType
or TaskType
, you can write directly like this:
eTaskType::TYPE_UNKNOWN
TaskType::TYPE_UNKNOWN