Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void txtM::Process(fstream& f, fstream& outFile) {
- if (f.is_open()) {
- f >> resetiosflags(ios::skipws);
- checkCount(f, outFile, countV);
- outFile << endl;
- outFile << "Текст вставка: " << endl;
- int i = 0, k = 0;
- while (i < countV) {
- strL* p1 = new strL(f);
- for (int j = 0; j < p1->len; j++) {
- outFile << p1->A[j];
- }
- outFile << endl;
- strL* p;
- if (countR != 1 or k != 0) {
- p = first;
- while (p->next != last) {
- p = p->next;
- if (!p) return;
- }
- }
- else {
- p = last;
- }
- if (countR != 1) {
- p->next = p1;
- p1->next = last;
- }
- else {
- if (k == 0) {
- p1->next = p;
- first = p1;
- k += 1;
- }
- else {
- p->next = p1;
- p1->next = last;
- }
- }
- i += 1;
- }
- outFile << endl << "Модифицированный текст: " << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement