implementation phonebook class

This commit is contained in:
Hugo LAMY
2022-02-03 16:23:36 +01:00
parent aa77271631
commit 8abc2d30a9
7 changed files with 54 additions and 52 deletions

View File

@@ -1,34 +1,27 @@
#include "PhoneBook.class.hpp"
#include "Contact.class.hpp"
# include <iostream>
# include <string>
int main() {
Contact new_contact;
new_contact.add_first("hugo");
new_contact.add_last("lamy");
new_contact.add_nick("hugonosaure");
new_contact.add_num("0123456789");
new_contact.add_secret("je suis un dino");
new_contact.print_contact();
std::string cmd;
while (1)
{
std::getline(std::cin, cmd);
if (cmd.compare("ADD") == 0)
std::cout << "it works !" << std::endl;
}
return 0;
}
/*
* class PhoneBook :
* add_contact (->Contact.create_contact)
* search_contact
* print_phonebook (->Contact.get_index/name/last/nick)
* index_print (Contact.print_contact)
* add_contact
* print_phonebook
* search_by_index
* exit
*
* class Contact :
* create_contact (first ; last ; nick ; num ; secret)
* get_first
* get_last
* get_nick
* print_contact
*
*/