==============================================*/Рscore *load(score *head)Р{Р score *p1,*p2;Р int m=0;Р char filepn[10];Р FILE *fp;Р printf("please input file's postion and its name:");Р scanf("%s",filepn);/*输入文件路径及名称*/Р if((fp=fopen(filepn,"r+"))==NULL)Р {Р printf("can't open this file!\n");Р getch();Р return 0;Р }Р elseР {Р p1=(score *)malloc(LEN); /*开辟一个新单元*/Р fscanf(fp,"%d%s%d\n",&p1->number,p1->name,&p1->xiaofei);Р printf("|%d\t|%s\t|%d\t\n",p1->number,p1->name,p1->xiaofei);Р /*文件读入与显示*/Р head=NULL;Р doР {Р n=n+1;Р if(n==1)Р head=p1;Р elseР p2->next=p1;Р p2=p1;Р p1=(score *)malloc(LEN); /*开辟一个新单元*/Р fscanf(fp,"%d%s%d\n",&p1->number,p1->name,&p1->xiaofei);Р printf("|%d\t|%s\t|%d\t\n",p1->number,p1->name,p1->xiaofei);Р /*文件读入与显示*/Р }while(!feof(fp));Р p2->next=p1;Р p1->next=NULL;Р n=n+1;