-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
40 lines (31 loc) · 951 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
Braeden Treutel
Program Description:
This project is a flight itinerary that produces a compact block of text, telling what cities you can fly to and how much it will cost.
The input of the program are two data files, one with the flights and the other with the cities.
The output of the program is the block of text that tells you what cities you can fly to and how much it will cost.
*/
//include statements
#include <iostream>
#include <fstream>
#include "type.h"
#include "flightMap.h"
using namespace std;
int main() {
//making the flightmap object
flightMap f;
//read in both files
ifstream inFile("cities.dat");
ifstream inFile2("flights.dat");
//using these functions to read in from each file
f.read_cities(inFile);
f.read_flights(inFile2);
//sort the flights in alphabetical order
f.sort_flights();
//print out the table
cout << f;
//close the files
inFile.close();
inFile2.close();
return 0;
}