Question: using c++ i am trying to write a program that will let a user enter any city and country (or at least a 2 lettter
using c++ i am trying to write a program that will let a user enter any city and country (or at least a 2 lettter substring from the name ) and give the user all matching cities. if there are no matches, asks for another name. my problem is i need to read the strings in from a data file called connections.txt and im not sure how i should read in the data file because of its formating.
this is a small example of the format that connections.txt is in.
From: Seoul, South Korea To : Toronto, Canada Luxembourg, Luxembourg Seattle, United States Dhaka, Bangladesh Guatemala City, Guatemala From: Tokyo, Japan To : Ottawa, Canada Vilnius, Lithuania Rome, Italy
once i get the cities, i need to build a graph and run a breadth first search on the graph to find the shortest path from one city to another
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
