Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions

Question

what are the provisions in the absence of Partnership Deed?

Answered: 1 week ago

Question

1. What is called precipitation?

Answered: 1 week ago

Question

1.what is dew ?

Answered: 1 week ago