Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ConsoleApplication4.cpp : Defines the entry point for the console application.
- //graph
- #include "stdafx.h"
- #include <iostream>
- #include "List.h"
- #include <stdio.h>
- #include "Vertex.h"
- using namespace std;
- int main()
- {
- Graph graf;
- Vertex * v1 = new Vertex(1, 1);
- Vertex * v2 = new Vertex(2, 2);
- Vertex * v3 = new Vertex(3, 3);
- Vertex * v4 = new Vertex(4, 4);
- Vertex * v5 = new Vertex(5, 6);
- graf.insert(v1);
- graf.insert(v2);
- int * siblings = new int[4];
- siblings[0] = 1;
- siblings[1] = 2;
- graf.insert(v3, siblings, 2);
- siblings[0] = 3;
- graf.insert(v4, siblings, 1);
- siblings[0] = 2;
- siblings[1] = 3;
- graf.insert(v5, siblings, 2)
- delete[] siblings;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement