上記のコンパイルエラーが発生しています。コード行は次のとおりです。
if ((strcmp(tempDept, data[1].Dept)==0) && tempCourse == data[i].course){
if (tempDay = data[i].meet_days &&
tempTime == data[i].start.hour){ //<---This line
printf("this worked");
}
}
これが私の構造体宣言です:
typedef enum {MW, TR} days;
typedef struct {
int hour, min;
} Time;
typedef struct {
char Dept[5];
int course, sect;
days meet_days;
Time start, end;
char instr[20];
} sched_record;
そして、これが変数からの私のリストです:
int switchInput;
int i = 0;
int tempCourse = 0;
char tempDept[5];
char tempDay[2];
int tempTime;
//char tempTime[1];
FILE *filePointer;
sched_record data[MAX_RECORD];
誰かがこれを修正する方法を教えてもらえますか?