//FILE *stdin1; //FILE *stdin2; //freopen("D:/p/BB/11.txt", "r", stdin); //freopen("D:/p/BB/22.txt", "r", stdin2); freopen("D:/p/BB/1_2.txt", "w", stdout); FILE * fp1 = fopen("D:/p/BB/1.txt", "r"); FILE * fp2 = fopen("D:/p/BB/2.txt", "r"); double x, y; fscanf(fp1,"%lf",&x);//从输入文件读取一个整数 fscanf(fp2, "%lf", &y); //printf("%lf %lf ", x, y);