Answer the question
In order to leave comments, you need to log in
What is the cause of the _Pnext error in C++?
It is required to take part of the data from one text file, and the other from a binary one.
void zapoln_script() {
FILE *from_sc, *to, *from_txt;
fopen_s(&from_sc, "scenario.txt", "r");
fopen_s(&from_txt, "ru.txt", "rb");
//fopen_s(&to, "Tsest.bov", "wb");
//fopen_s(&f, "one.save", "wb");
scrpt a;
int i, a1, a2, a3, a4;
Tx b;
while (fscanf_s(from_sc, "%d %d %d %d", &a1, &a2, &a3, &a4) != EOF) {
a.num = a1;
a.chs = a2;
a.scn = a3;
a.kolvo = a4;
a.renew_mem();
for (i = 0; i < a.kolvo; i++) {
fread(&b, 1, sizeof(Tx), from_txt);
if (b.num == a.num) {
a.repls[i] = b.st;
}
else cout « a.num « b.num « "ERROR\n";
}
a.print();
};
fclose(from_sc);
fclose(from_txt);
//fclose(to);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question