aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsahel <[email protected]>2024-03-01 10:09:02 -0800
committerAsahel <[email protected]>2024-03-01 10:09:02 -0800
commitb8292cf929fa9b8afc907cbcfc3e2c895d42b470 (patch)
tree51630fb6fd3ec2dbfcc0996cd218375a14234d5a
parentAdded files (diff)
downloadhomework-6-asahellt-main.tar.xz
homework-6-asahellt-main.zip
-rw-r--r--Homework6/Contacts.h2
-rw-r--r--Homework6/program.cpp7
2 files changed, 8 insertions, 1 deletions
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