void readmessage(struct cartype *pt,FILE *fp){
fgetc(fp);
fgets(pt->cid,12,fp);
fscanf(fp,"%d %d",&(pt->mailes),&(pt->gallons));
printf("%-15s%-15.f%-15.f\n",pt->cid,pt->mailes,pt->gallons);
}
文件是record.txt
BJ A00001 1120450 48000
SH C00002 300240 12600
HN F00003 16792 716
SX P00004 2360 105
GD N00005 20114 647
这是我运行出来的结果,,为什么都是0呢,,,开始的时候还可以显示的来着!