diff --git a/ex01/src/main.cpp b/ex01/src/main.cpp index 9072da9..6be9bcc 100644 --- a/ex01/src/main.cpp +++ b/ex01/src/main.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include "../include/PhoneBook.hpp" @@ -34,10 +35,9 @@ Contact* read_contact() return (NULL); return (new Contact(first_name, last_name, nickname, phone_number, darkest_secret)); - } -Contact* search(PhoneBook phone_book) +Contact* search(PhoneBook &phone_book) { int index; std::string index_str; @@ -60,7 +60,6 @@ int main() Contact* contact; PhoneBook phone_book; - phone_book = PhoneBook(); while (true) { std::cout << "command: ";