diff --git a/VL03-03-01/main.cc b/VL03-03-01/main.cc index 74a9b3d..33758d2 100644 --- a/VL03-03-01/main.cc +++ b/VL03-03-01/main.cc @@ -32,12 +32,13 @@ void clear(std::vector &phonebook) { std::vector getPhonebookFromFile(std::string filename) { std::ifstream file(filename); - std::string line; - int rownumber = 0; std::vector phonebook; phonebook_entry* entry; if (file.is_open()) { + int rownumber = 0; + std::string line; + while (file >> line) { switch (rownumber % 3) { case 0: