From 36f63ce5a5ac9642ea0d63e44ba91c98a08e16e4 Mon Sep 17 00:00:00 2001 From: Connor McDowell Date: Sun, 3 Mar 2024 15:16:08 -0800 Subject: first commit of the day, following lecture. again. --- Project1/program.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Project1/program.cpp') diff --git a/Project1/program.cpp b/Project1/program.cpp index a8971b4..c887eac 100644 --- a/Project1/program.cpp +++ b/Project1/program.cpp @@ -17,11 +17,12 @@ int main() size_t MAX = 3; int O = 1; /* t = index counter*/ + //contact newContact[]; contact* newContact = new contact[MAX]; contact_list contact_list; size_t t = 0; - int size = sizeof(newContact); + contact_list.set_size(sizeof(newContact[MAX])); while (O == 1) { //cout << MAX << endl; @@ -50,13 +51,14 @@ int main() } break; case 2: - contact_list.update(*newContact, MAX); + contact_list.Update(*newContact, MAX); break; case 3: contact_list.Print(newContact, MAX); // Print only the existing contacts break; case 4: contact_list.DeleteContact(newContact, MAX); + contact_list.CopyList(newContact, MAX); break; case 5: O = 0; -- cgit v1.2.3