Advertisement
Mikhail-Podbolotov

Untitled

May 8th, 2024
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #pragma once
  2. #include <iostream>
  3. #include <fstream>
  4. #include <string>
  5. using namespace std;
  6.  
  7. struct AdjPoint {
  8.     int value;
  9.     AdjPoint* next = nullptr;
  10. };
  11.  
  12. struct Point
  13. {
  14.     int number;
  15.     AdjPoint* First = nullptr;
  16.     AdjPoint* Last = nullptr;
  17.     Point* NextPoint = nullptr;
  18. };
  19.  
  20. class List
  21. {
  22. private:
  23.     Point* Start;
  24.     Point* End;
  25. public:
  26.     List();
  27.     ~List();
  28.     Point* getStart();
  29.     int GetLast();
  30.     void addPoint();
  31.     void addAdjPoint(int);
  32.     void Print(std::ofstream& file);
  33.     void Read(std::ifstream& file);
  34. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement