Guest User

Untitled

a guest
Jan 24th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. ofstream out("exit.txt");
  2. out << "Showing info of graph:nn";
  3. out << "Number of vertices: " << V;
  4. out << "nNumber of edges: " << map_edges.size() << "n";
  5. out.close();
  6.  
  7. ofstream out("exit.txt", ios::app);
  8. //out.open("exit.txt", std::ofstream::out | std::ofstream::app);
  9. out << "hello";
  10. map<pair<int, int>, int>::iterator it;
  11. for (it = map_edges.begin(); it != map_edges.end(); ++it)
  12.  
  13. out << it->first.first << " linked to vertex " << it->first.second << " with weight " << it->second << endl;
  14. out.close();
Add Comment
Please, Sign In to add comment