I am trying to write a program that will read three txt file, first has city names,second the flight map,and third has the request flight.for this input the program should produce the following output:
Request is to fly from Albuquerque to San Diego.
HPAir flies from Albuquerque to San Diego.
Request is to fly from Albuquerque to Paris.
Sorry.HPAir does not serve Paris.
I made some of the header file and just started doing the main, but I don't know how.please help me understand and build the correct code, I have the pseudo code for some of them but not all and I couldn't translate it to a code.
the following is the header file and main part:
From mimi88's code and pseudo code, i am beginning to think there is much more to the question.
First, depending on the sample output and input text files, i dont see any use for cities.txt.
You simply check in the flightmap for a corresponding match in request.
Also, i see bool visited, Node<City> *, getNextCity(), isPath(), etc... . This tells me that you are actually building a route. Is that part of the question?
It would be better if for all of us if you lay out your ideas. @cpp hoping to hear from you.