In a sample .txt file to be read in for a uniform cost search program, the first city in a line is the source, followed by the destination city, and finally the distance between the two cities.
The issue I am having is I do not know how I could read in all cities and respective neighboring cities. A sample of input data is below. I appreciate any help/ideas!
Thank you for your reply, Thomas! Would it be possible to perform a search algorithm on the vector of Connections as it is in this state? Is it not necessary to, for example, create a vector of a new class City with each City having a vector of neighbor Cities and their respective distances?