phonebook operationnel et coloree
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "PhoneBook.class.hpp"
|
||||
#include "color.h"
|
||||
|
||||
# include <iostream>
|
||||
# include <string>
|
||||
@@ -6,22 +7,31 @@
|
||||
int main() {
|
||||
|
||||
std::string cmd;
|
||||
PhoneBook YellowPage;
|
||||
|
||||
while (1)
|
||||
{
|
||||
std::cout << std::endl;
|
||||
std::cout << B_YELLOW "enter a command: ADD / SEARCH / EXIT" << std::endl;
|
||||
std::cout << std::endl << B_GREEN;
|
||||
std::getline(std::cin, cmd);
|
||||
std::cout << RESET << std::endl;
|
||||
if (cmd.compare("ADD") == 0)
|
||||
std::cout << "it works !" << std::endl;
|
||||
YellowPage.add_contact();
|
||||
else if (cmd.compare("SEARCH") == 0)
|
||||
YellowPage.search_contact();
|
||||
else if (cmd.compare("EXIT") == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* class PhoneBook :
|
||||
* add_contact
|
||||
* print_phonebook
|
||||
* search_by_index
|
||||
* exit
|
||||
*/
|
||||
// B_GRAY "\e[1;30m"
|
||||
// B_RED "\e[1;31m"
|
||||
// B_GREEN "\e[1;32m"
|
||||
// B_YELLOW "\e[1;33m"
|
||||
// B_BLUE "\e[1;34m"
|
||||
// B_PURPLE "\e[1;35m"
|
||||
// B_CYAN "\e[1;36m"
|
||||
// B_WHITE "\e[1;37m"
|
||||
|
||||
Reference in New Issue
Block a user