Advertisement
Guest User

paths

a guest
Mar 27th, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1.     void showPathes()
  2.     {
  3.         for (auto x : nodes)
  4.         {
  5.             int cur = x.n;
  6.             cout << cur;
  7.             while (cur != -1)
  8.             {
  9.                 cout << "<-" << cur;
  10.                 cur = nodes[cur].p;
  11.             }
  12.             cout << endl;
  13.         }
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement