文本文件不要用 fread,fread 读 2 进制文件用 float x;fscanf(fin,"%f",&x); // 读 7659.15 printf("%f\n",x); // 用 %f 格式打印。
float类型读,float与long的存储格式不一样,会读错