r=Q.front->next; while(r){
if(strcmp(r->cNo,cNo)==0){ r->degree=degree; flag=1; break; }
r=r->next;} return flag; }
int isNo(char *No) {
int j,flag=1;
for(j=0;No[j]!='\\0';j++){ if(No[j]<'0'||No[j]>'9'){ flag=0; break; } }
return flag; }
int isGender(char *gender) {
int flag=0;
if((strcmp(gender,\男\女\ flag=1; return flag; }
int isYN(char *YN) {
int flag=0;
if((strcmp(YN,\是\否\ flag=1; return flag; }
Status InsertFile(student Q) {
FILE *fp1;
if (!(fp1 = fopen(\ cout << \打开文件错误\
fprintf(fp1,\day,Q.phoneNo,Q.tpartym,Q.addr); fclose(fp1); courses *r;
if (Q.front == Q.rear) return ERROR; r = Q.front->next; while (r){
if (strcmp(r->cNo, \
if (!(fp1 = fopen(\ cout << \打开文件错误\ else
fprintf(fp1, \ fclose(fp1); }
else if (strcmp(r->cNo, \
if (!(fp1 = fopen(\ cout << \打开文件错误\ else
fprintf(fp1, \ fclose(fp1); }
else if (strcmp(r->cNo, \
if (!(fp1 = fopen(\ cout << \打开文件错误\ else
fprintf(fp1, \ fclose(fp1); }
else if (strcmp(r->cNo, \
if (!(fp1 = fopen(\ cout << \打开文件错误\ else
fprintf(fp1, \ fclose(fp1); }
r = r->next; }
return OK; }
Status reWFile(student *p1,int i) {
FILE *fp,*fp1,*fp2,*fp3,*fp4;
if (!(fp = fopen(\ cout << \打开文件basedata错误\ exit(0);}
if (!(fp1 = fopen(\ cout << \打开文件c01错误\ exit(0);}
if (!(fp2 = fopen(\ cout << \打开文件c02错误\ exit(0);}
if (!(fp3 = fopen(\ cout << \打开文件c03错误\ exit(0);}
if (!(fp4 = fopen(\ cout << \打开文件c04错误\ exit(0);} for(int j=0;j
fprintf(fp,\der,p1[j].brithday,p1[j].phoneNo,p1[j].tpartym,p1[j].addr); courses *r;
r = p1[j].front->next; while (r){
if (strcmp(r->cNo, \
fprintf(fp1, \ else if (strcmp(r->cNo, \
fprintf(fp2, \ else if (strcmp(r->cNo, \
fprintf(fp3, \ else if (strcmp(r->cNo, \
fprintf(fp4, \ r = r->next; } }
fclose(fp); fclose(fp1); fclose(fp2); fclose(fp3); fclose(fp4); return OK; }