一个c程序,错在哪里啊?--求助
#include "stdafx.h"
#include <iostream.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char* argv[])
{
FILE *fp;
fp = fopen("wm_model_data3_20060912_08","rb");
FILE *fout;
fout = fopen("out.txt","wb");
double tmp[20];
int i;
while(!feof(fp))
{
for(i=0;i<10;i++)
{
if(fscanf(fp,"%lf",&tmp[i]) < 0 )
break;
fprintf(fout,"%13f",tmp[i]);
if(i == 9) fprintf(fout,"\n"); //一行10个数
}
}
fclose(fp);
return 0;
}
为什么输出的out.txt这个文件里的内容不是二进制呢?