typedef enum {FAILED = 0,PASSED = FAILED} TestStatus; 这是

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/27 00:28:24
typedefenum{FAILED=0,PASSED=FAILED}TestStatus;这是typedefenum{FAILED=0,PASSED=FAILED}TestStatus;这是type

typedef enum {FAILED = 0,PASSED = FAILED} TestStatus; 这是
typedef enum {FAILED = 0,PASSED = FAILED} TestStatus; 这是

typedef enum {FAILED = 0,PASSED = FAILED} TestStatus; 这是
定一个枚举类型TestStatus,该类型类似于布尔值,0(FAILED)和非零(PASSED)两种取值.
TestStatus可以用来定义变量,如
TestStatus result = FAILED;