aboutsummaryrefslogtreecommitdiff
path: root/Project1/Contact_list.h
diff options
context:
space:
mode:
Diffstat (limited to 'Project1/Contact_list.h')
-rw-r--r--Project1/Contact_list.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/Project1/Contact_list.h b/Project1/Contact_list.h
new file mode 100644
index 0000000..1748a44
--- /dev/null
+++ b/Project1/Contact_list.h
@@ -0,0 +1,40 @@
+#ifndef CONTACT_LIST_H
+#define CONTACT_LIST_H
+
+#include "Contacts.h"
+
+class contact_list
+{
+private:
+
+ contact* contacts_{ nullptr };
+
+ size_t length_{ 0 };
+
+ size_t size_{ 0 };
+
+public:
+ contact_list() = default;
+ ~contact_list();
+
+ void set_length(size_t MAX);
+ size_t get_length();
+
+ void set_size(size_t size);
+ size_t get_size();
+
+ void DeleteContact(contact newContact[], size_t MAX);
+
+ void CopyList(const contact* contacts, const size_t& size);
+
+ void AddContact(const contact& contact, size_t MAX, size_t& t);
+
+ void Update(contact newContact, size_t MAX);
+
+ void Print(contact newContact[], size_t& MAX) const;
+
+ size_t Size() const;
+};
+
+
+#endif CONTACT_LIST_H