Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <iostream>
- #include <fstream>
- #include <string>
- using namespace std;
- struct Edge {
- int x1;
- int x2;
- Edge* next = nullptr;
- };
- struct AdjPoint {
- int value;
- AdjPoint* next = nullptr;
- };
- struct Point
- {
- int number;
- AdjPoint* First = nullptr;
- AdjPoint* Last = nullptr;
- Point* NextPoint = nullptr;
- };
- class List
- {
- private:
- Point* Start = nullptr;
- Point* End = nullptr;
- public:
- List();
- ~List();
- Point* getStart();
- int GetLast();
- void addPoint();
- void addAdjPoint(int);
- void Print(std::ofstream& file);
- void Read(std::ifstream& file);
- };
- class EdgeList {
- private:
- Edge* Start = nullptr;
- Edge* End = nullptr;
- public:
- EdgeList();
- ~EdgeList();
- bool find(int x1,int x2);
- void appendEdge(int x1,int x2);
- void readFromList(List& A);
- void print(std::ofstream& file);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement