fix
This commit is contained in:
17
ex01/include/Contact.hpp
Normal file
17
ex01/include/Contact.hpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
class Contact {
|
||||
private:
|
||||
std::string first_name;
|
||||
std::string last_name;
|
||||
std::string nickname;
|
||||
std::string phone_number;
|
||||
std::string darkest_secret;
|
||||
|
||||
public:
|
||||
Contact(std::string first_name, std::string last_name, std::string nickname, std::string phone_number, std::string darkest_secret);
|
||||
|
||||
std::string to_string_partial() const;
|
||||
std::string to_string_complete() const;
|
||||
};
|
17
ex01/include/PhoneBook.hpp
Normal file
17
ex01/include/PhoneBook.hpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "Contact.hpp"
|
||||
#include <cstddef>
|
||||
|
||||
class PhoneBook {
|
||||
private:
|
||||
Contact *contacts[8];
|
||||
|
||||
public:
|
||||
size_t len;
|
||||
|
||||
PhoneBook();
|
||||
~PhoneBook();
|
||||
|
||||
void add_contact(Contact *new_contact);
|
||||
void display_contacts();
|
||||
Contact* search(int index);
|
||||
};
|
3
ex01/include/utils.hpp
Normal file
3
ex01/include/utils.hpp
Normal file
@ -0,0 +1,3 @@
|
||||
#include <string>
|
||||
|
||||
std::string truncated(const std::string str);
|
Reference in New Issue
Block a user