diff --git a/.vscode/settings.json b/.vscode/settings.json index e896255..2494bf3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -71,6 +71,7 @@ "ratio": "cpp", "stack": "cpp", "__tree": "cpp", - "map": "cpp" + "map": "cpp", + "filesystem": "cpp" } } \ No newline at end of file diff --git a/main b/main index a1d41ad..f028e8b 100755 Binary files a/main and b/main differ diff --git a/src/main.cpp b/src/main.cpp index f05bd9d..f6e40c2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -52,27 +52,32 @@ int main(int argc, char* argv[]) // std::vector edges; std::ifstream flights("src/flight-paths.csv"); - std::string path; - while(std::getline(flights,path)) - { - std::stringstream lineStream(path); - std::string value; - int ind = 0; - std::string prev; - while(std::getline(lineStream,value,',')) - { - // You have a cell!!!! - if (ind == 1) { - prev = value; - } - if (ind == 2) { - cityIata[prev].c_cities.push_back(&(cityIata[value])); - } - ind++; - // std::cout << value << std::endl; - } - } + std::string path; + while(std::getline(flights,path)) + { + std::stringstream lineStream(path); + std::string value; + int ind = 0; + std::string prev; + while(std::getline(lineStream,value,',')) + { + // You have a cell!!!! + if (ind == 1) { + prev = value; + } + if (ind == 2) { + cityIata[prev].c_cities.push_back(&(cityIata[value])); + } + ind++; + // std::cout << value << std::endl; + } + } - std::cout<< cityIata["AER"].c_cities.size()<