Guest User

Untitled

a guest
Nov 2nd, 2016
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. #include<iostream>
  2. #include"Header.h"
  3. #include<string>
  4.  
  5. using namespace std;
  6. int main() {
  7.     //testTextFileOutput();
  8.     //testBinaryFileOutput();
  9.     //testTextFileInput();
  10.     //testBinaryFileInput();
  11.  
  12.     CrossRoad a = CrossRoad("orlov most"), b = CrossRoad("sofiiski universitet"), c = CrossRoad("hotel pliska"), d = CrossRoad("ulica septemvri");
  13.     a.AddNeighbor(&b, 200, true);
  14.     a.AddNeighbor(&c, 400, true);
  15.     a.AddNeighbor(&d, 600, true);
  16.     //cout << (PathExists(&b, &d) == 1 ? "Path exists" : "Path does not exist") << endl;
  17.     List<CrossRoad> path;
  18.     path = *Path(&b, &d);
  19.     for (int i = 0; i < path.Count(); i++)
  20.     {
  21.         cout << path.GetItem(i)->Name() << endl;
  22.     }
  23.     system("pause");
  24.     return 0;
  25. }
Add Comment
Please, Sign In to add comment