diff options
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; |