int main() {graph cityMap;... // initialization of the mapgraph::iterator start = cityMap.begin();graph::iterator stop = cityMap.end();for ( ; start != stop; ++start) { const char * city = (*start).first; cout << "\nStarting from " << city << "\n"; cityInfo costs; dijkstra(cityMap, city, costs); cityInfo::iterator cstart = costs.begin(); cityInfo::iterator cstop = costs.end(); for ( ; cstart != cstop; ++cstart) { cout << "to " << (*cstart).first << " costs " << (*cstart).second << '\n'; }}return 0;
int main() {graph cityMap;... // initialization of the mapgraph::iterator start = cityMap.begin();graph::iterator stop = cityMap.end();for ( ; start != stop; ++start) { const char * city = (*start).first; cout << "\nStarting from " << city << "\n"; cityInfo costs; dijkstra(cityMap, city, costs); cityInfo::iterator cstart = costs.begin(); cityInfo::iterator cstop = costs.end(); for ( ; cstart != cstop; ++cstart) { cout << "to " << (*cstart).first << " costs " << (*cstart).second << '\n'; }}return 0;