Graph Implemnetation

This method is find the city name and if is not find the city name just return null. The city name should be in the vector.
1
2
3
4
5
6
7
8
9
10
City* Map::findByName(string cityName){
	
	for (std::map<string>::iterator it=vmap.begin(); it!=vmap.end(); ++it)
	 {
		 if (City.cityName == cityName)
			 return cityName;
	 }
	 cout << "City not found " << endl;
	 return NULL;
}

This is a function and it in my adjacency list. This function si not
executed ,
Topic archived. No new replies allowed.