From c8a41214a06485ce310528b595782fb70dd88ee7 Mon Sep 17 00:00:00 2001 From: Connor McDowell Date: Thu, 29 Feb 2024 17:25:46 -0800 Subject: setting all functions to run in contact_list class --- Project1/program.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Project1/program.cpp') diff --git a/Project1/program.cpp b/Project1/program.cpp index 129284f..938b7ef 100644 --- a/Project1/program.cpp +++ b/Project1/program.cpp @@ -37,7 +37,8 @@ int main() switch (c) { case 1: - addNew(newContact, MAX, t); + //addNew(newContact, MAX, t); + contact_list.AddContact(newContact, MAX, t); if (t >= MAX) // Check if the number of contacts exceeds MAX { contact* newContactTemp = new contact[MAX * 2]; // Double the size @@ -49,13 +50,13 @@ int main() } break; case 2: - update(newContact, MAX); + contact_list.update(newContact, MAX); break; case 3: - printAll(newContact, MAX); // Print only the existing contacts + contact_list.Print(newContact, MAX); // Print only the existing contacts break; case 4: - delete_contact(newContact, MAX); + contact_list.DeleteContact(newContact, MAX); break; case 5: O = 0; -- cgit v1.2.3