34 lines
1.3 KiB
C++
34 lines
1.3 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.cpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2025/09/02 21:54:41 by aortigos #+# #+# */
|
|
/* Updated: 2025/09/07 11:02:47 by aortigos ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "Phonebook/Phonebook.hpp"
|
|
|
|
int main()
|
|
{
|
|
Phonebook ph;
|
|
std::string str;
|
|
|
|
str = "";
|
|
while (!std::cin.fail() && str != "EXIT")
|
|
{
|
|
std::cout << "Phonebook > ";
|
|
std::getline(std::cin, str);
|
|
|
|
if (str == "ADD")
|
|
ph.addContacts();
|
|
else if (str == "SEARCH")
|
|
ph.showContacts();
|
|
std::cout << std::endl;
|
|
}
|
|
|
|
return (0);
|
|
} |