36 lines
1.3 KiB
C++
36 lines
1.3 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* :::::::: */
|
|
/* PhoneBook.hpp :+: :+: */
|
|
/* +:+ */
|
|
/* By: whaffman <whaffman@student.codam.nl> +#+ */
|
|
/* +#+ */
|
|
/* Created: 2025/03/20 10:53:48 by whaffman #+# #+# */
|
|
/* Updated: 2025/04/01 11:38:02 by whaffman ######## odam.nl */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#pragma once
|
|
|
|
#include "Contact.hpp"
|
|
#include <string>
|
|
|
|
#define MAX_CONTACTS 8
|
|
|
|
class PhoneBook {
|
|
public:
|
|
PhoneBook();
|
|
void run();
|
|
|
|
private:
|
|
Contact _contacts[MAX_CONTACTS];
|
|
int _contactCount;
|
|
void printContact(const int i) const;
|
|
void printAllContacts() const;
|
|
std::string truncate(std::string str) const;
|
|
void searchContact() const;
|
|
void addContact();
|
|
|
|
};
|
|
|