double a = 0.0;. fprintf(fp, "a = %f", a);. 而如果要從文件中讀取一個double類型的浮點數, 就不能用%f, 而要用%lf才可以. 如. double a;. float b;. fscanf(fp ...
確定! 回上一頁