diff options
| author | Connor McDowell <[email protected]> | 2024-02-21 19:23:11 -0800 |
|---|---|---|
| committer | Connor McDowell <[email protected]> | 2024-02-21 19:23:11 -0800 |
| commit | 0557774b1e8e0124768aa03f24bda5c76dfc8c44 (patch) | |
| tree | e6baac6db2fdcb5a5e6ac6570681f239d57deaa6 /Project1/program.cpp | |
| parent | start: finishing delete and assignment (diff) | |
| download | homework-6-connormcdowell275-0557774b1e8e0124768aa03f24bda5c76dfc8c44.tar.xz homework-6-connormcdowell275-0557774b1e8e0124768aa03f24bda5c76dfc8c44.zip | |
testing
Diffstat (limited to 'Project1/program.cpp')
| -rw-r--r-- | Project1/program.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Project1/program.cpp b/Project1/program.cpp index a75931b..9c134fb 100644 --- a/Project1/program.cpp +++ b/Project1/program.cpp @@ -37,7 +37,6 @@ int main() { case 1: addNew(newContact, MAX, t); - ++t; if (t >= MAX) // Check if the number of contacts exceeds MAX { contact* newContactTemp = new contact[MAX * 2]; // Double the size @@ -55,7 +54,7 @@ int main() printAll(newContact, t); // Print only the existing contacts break; case 4: - delete_contact(newContact); + delete_contact(newContact, MAX); break; case 5: O = 0; |