Hello在我的头文件Data.h中我将boolean类型定义为枚举,但是出现了编译错误,我不明白为什么:
// Data.h
// Author : Alexandre rousset
typedef enum {NO, YES} bool;
typedef struct stud {
char *date;
char *name; /* student name */
} Student;
void studentInit(Student *new);
bool studentPassExam(Student *s);
我收到了这个错误:
include/Data.h:4: error: two or more data types in declaration specifiers
include/Data.h:4: warning: useless storage class specifier in empty declaration
感谢您的帮助。