N
Newbik
Помогите плз. Диплом горит! Не работает! Почему не пойму. В чем ошибка?
C++:
void __fastcall TForm1::Button8Click(TObject *Sender)
{
FILE *f0, *f1, *f2;
char file[256], ch[16];
int Day0, Year0, Year1, Day1;
float max, min;
f2=fopen("max-minfrqF2.dat", "wt");
f0=fopen("D:\\Diplom\\6kyrs\\maxfrqF2.dat", "r");
fscanf(f0, "%d %d %f", &Year0, &Day0, &max);
f1=fopen("D:\\Diplom\\6kyrs\\minfrqF2.dat", "r");
fscanf(f1, "%d %d %f", &Year1, &Day1, &min);
while (fscanf(f0, "%d %d %f", &Year0, &Day0, &max)==3 && fscanf(f0, "%d %d %f", &Year1, &Day1, &min)==3)
{
if (Year0==Year1 && Day0==Day1) { fprintf(f2,"%4d %2d %6.1f\n", Year1, Day1, max-min); }
else { break; }
}
fclose(f0);
fclose(f1);
fclose(f2);
}