改如下便可——
//#include "stdafx.h"//vc++6.0加上这一行.
#include "stdio.h"
#define N 50
int main(void){
FILE *fp;
double T[N], D[N];
int i;
fp=fopen("F:\\data1.txt","r");
for(i=0;ifscanf(fp,"%lf%*c%lf",&T[i],&D[i]);//告诉fscanf函数跳过两个数之间的空格
printf("%f\t%f\n",T[i],D[i]);//这里不能是T[0],D[0],且要把这两行{}起来
}
fclose(fp);
return 0;
}