aboutsummaryrefslogtreecommitdiff
path: root/Project1/program.cpp
diff options
context:
space:
mode:
authorConnor McDowell <[email protected]>2024-03-03 15:16:08 -0800
committerConnor McDowell <[email protected]>2024-03-03 15:16:08 -0800
commit36f63ce5a5ac9642ea0d63e44ba91c98a08e16e4 (patch)
tree8e3969324f127e54a659586918bf5c8106f5e595 /Project1/program.cpp
parentall functions refactored to fit in contact list. testing now. (diff)
downloadhomework-7-connormcdowell275-36f63ce5a5ac9642ea0d63e44ba91c98a08e16e4.tar.xz
homework-7-connormcdowell275-36f63ce5a5ac9642ea0d63e44ba91c98a08e16e4.zip
first commit of the day, following lecture. again.
Diffstat (limited to 'Project1/program.cpp')
-rw-r--r--Project1/program.cpp6
1 files changed, 4 insertions, 2 deletions
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;