Advertisement
vadim_sharaf

Untitled

Mar 28th, 2023
574
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. void txtM::Process(fstream& f, fstream& outFile) {
  2.     if (f.is_open()) {
  3.         f >> resetiosflags(ios::skipws);
  4.         checkCount(f, outFile, countV);
  5.         outFile << endl;
  6.         outFile << "Текст вставка: " << endl;
  7.         int i = 0;
  8.         while (i < countV) {
  9.             strL* p1 = new strL(f);
  10.             for (int j = 0; j < p1->len; j++) {
  11.                 outFile << p1->A[j];
  12.             }
  13.             outFile << endl;
  14.             strL* p = first;
  15.             while (p->next != last) {
  16.                 p = p->next;
  17.                 if (!p) return;
  18.             }
  19.             p->next = p1;
  20.             p1->next = last;
  21.             i += 1;
  22.         }
  23.         outFile << endl << "Модифицированный текст: " << endl;
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement