First of all, it's my first time here.
Also, i'm working on a simple rent management program for a school project. I've fixed most of the errors but i'm lost on what could be wrong here:
error: continue statement not within a loop
Also, i'm working on a simple rent management program for a school project. I've fixed most of the errors but i'm lost on what could be wrong here:
error: continue statement not within a loop
Code:
while(fscanf(records,"%s %s %s %s %d %d %d %d %d %d", idNumber, familyName, firstName, bookCode, &dateIn.month, &dateIn.day, &dateIn.year, &dateOut.month, &dateOut.day, &dateOut.year)!=EOF); { reply='n'; if (stricmp(idNumber,idCheck)==0) { printf("Will you check in this?: ID#: %s\nName: %s, %s\nBook Code: %s borrowed on %d/%d/%d Due: %d/%d/%d(y/n)?\n",idNumber, familyName,firstName,bookCode,dateIn.month,dateIn.day,dateIn.year); if (dateToday.year>dateOut.year){ printf("THE BOOK IS OVERDUE.");} else if ((dateToday.year>=dateOut.year) && (dateToday.month>dateOut.month)){ printf("THE BOOK IS OVERDUE.");} else if (((dateToday.year>=dateOut.year) && (dateToday.month>=dateOut.month)) && (dateToday.day>dateOut.day)){ printf("THE BOOK IS OVERDUE.");} scanf("%c", reply); } if ((reply=='y') || reply=='Y') continue; fprintf(temp,"%s %s %s %s %d %d %d %d %d %d", idNumber, familyName, firstName, bookCode, dateIn.month, dateIn.day, dateIn.year, dateOut.month, dateOut.day, dateOut.year); }
Comment