Commit f4a9b878 authored by Brandon Reid's avatar Brandon Reid

autosave

parent aa104ca1
#include "countries.h"
#include <iostream> //make a function
#include <utitlity>
#include <utility>
#include <string>
#include <map>
#include <ifstream>
#include <fstream>
using namespace std;
//function returns map of pairs
pair<double, double> longAndLat () {
ifstream fin;
fin.open("countries.txt");
ifstream filestream("countries.txt");
print("Print this", filestream);
//variables
vector <pair<double, double>> coordinateVector;
......@@ -22,9 +24,7 @@ pair<double, double> longAndLat () {
exit(1);
}
while(!fin.eof()) {
pair<double,double> tempPair;
getline(fin, placeName, '.');
getline(fin, tempPair.first, '.');
......@@ -33,6 +33,9 @@ pair<double, double> longAndLat () {
tempMap.emplace(placeName, tempPair);
placeName.clear();
}
return tempMap;
}
//=======
// TODO Print the cities
......@@ -53,4 +56,4 @@ pair<double, double> longAndLat () {
return coordinateVector.at(cityNum - 1);
}
\ No newline at end of file
}
......@@ -12,6 +12,7 @@
*/
#include <iostream>
#include "countries.cpp"
#include <vector>
using namespace std;
......@@ -21,5 +22,8 @@ int main {
//Welcomeing the user
cout << "Welcome to the Star Gazer Application!" << endl;
pair<double, double> longAndLat ();
return 0;
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment