Backing up

This commit is contained in:
2020-03-29 15:39:26 -06:00
parent 6474ac5d21
commit 0b393b2581
63 changed files with 3755 additions and 0 deletions

19
HW10/ReadFromFile.cpp Normal file
View File

@@ -0,0 +1,19 @@
//
// Created by Brady Bodily on 3/28/20.
//
#include <filesystem>
namespace fs = std::filesystem;
#include "ReadFromFile.h"
std::vector<City> ReadFromFile::ReadFile(const std::string& fileName){
std::vector<City> cities;
std::ifstream infile(fileName);
int x, y;
int name = 0;
while (infile >> x >> y) {
City city;
city.SetCoordinates(x, y, name);
cities.push_back(city);
name++;
}
return cities;
}