From 49f93acdee18ffbaf2f1441855a222fd12c481b0 Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Fri, 19 May 2023 14:59:37 +0200 Subject: [PATCH] fix: ctrl + D not supported --- ex01/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ex01/main.cpp b/ex01/main.cpp index 2c7281d..d800766 100644 --- a/ex01/main.cpp +++ b/ex01/main.cpp @@ -40,7 +40,10 @@ int main() if (new_contact.isValid()) phone_book.add_contact(new_contact); else + { std::cerr << "Contact Error !" << std::endl; + return (1); + } } else if (command == "SEARCH") { @@ -50,6 +53,11 @@ int main() { return (0); } + else + { + std::cerr << "Command not found" << std::endl; + return (2); + } } return (0); }