Advertisement
Mikhail-Podbolotov

Untitled

May 1st, 2024
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.79 KB | None | 0 0
  1. #pragma once
  2. #include <fstream>
  3. #include <string>
  4. using namespace std;
  5. struct Reserv {
  6.     string word;
  7.     int idx = 0;
  8.     Reserv* next = nullptr;
  9.     int count = 0;
  10. };
  11. class ListF {
  12. private:
  13.     Reserv* Start;
  14.     Reserv* End;
  15. public:
  16.     ListF();
  17.     ~ListF();
  18.     void ReadF(fstream& FD);
  19.     void ReadTextF(string);
  20.     void AddWord(string);
  21.     int LastIdx();
  22.     Reserv* getStart();
  23.     void PrintListF(fstream& FD);
  24. };
  25. string ReadText(std::ifstream& input);
  26. struct BD {
  27.     string str;
  28.     int idx = 0;
  29.     BD* next = nullptr;
  30. };
  31. class ListB {
  32. private:
  33.     BD* Start;
  34.     BD* End;
  35. public:
  36.     ListB();
  37.     ~ListB();
  38.     void ReadB(fstream&);
  39.     void ReadTextB(string,ListF A);
  40.     void AddWord(string);
  41.     int LastIdx();
  42.     void PrintListB(fstream&);
  43. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement