From b8292cf929fa9b8afc907cbcfc3e2c895d42b470 Mon Sep 17 00:00:00 2001 From: Asahel Date: Fri, 1 Mar 2024 10:09:02 -0800 Subject: Done. --- Homework6/Contacts.h | 2 +- Homework6/program.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Homework6/Contacts.h b/Homework6/Contacts.h index 7aded7d..8e590a0 100644 --- a/Homework6/Contacts.h +++ b/Homework6/Contacts.h @@ -16,6 +16,6 @@ Contact ContactUpdate(); void PrintContacts(Contact(&contacts)[10]); void ContactUpdate(Contact(&contacts)[10]); - +void addContact(Contact(&contacts)[3]); #endif // !CONTACT_H diff --git a/Homework6/program.cpp b/Homework6/program.cpp index c08993f..3704aa9 100644 --- a/Homework6/program.cpp +++ b/Homework6/program.cpp @@ -46,5 +46,12 @@ int main() } while (c != 'x'); + new Contact(); + for (size_t i = 0; i < size; ++i) { + newContacts[i] = contacts[i]; + } + + delete[] contacts; + return 0; } \ No newline at end of file -- cgit v1.2.3