diff options
Diffstat (limited to 'Homework6')
| -rw-r--r-- | Homework6/Homework6/contacts.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Homework6/Homework6/contacts.cpp b/Homework6/Homework6/contacts.cpp index 23b4790..c4fa85f 100644 --- a/Homework6/Homework6/contacts.cpp +++ b/Homework6/Homework6/contacts.cpp @@ -20,6 +20,7 @@ void addContact(Contact contacts[], int& numContacts,int& arraySize) { Contact& newContact = contacts[numContacts]; + cout << "Enter Name: "; cin >> newContact.Name; @@ -109,7 +110,7 @@ void deleteContact(Contact contacts[], int& numContacts) { for (int i = num; i < numContacts - 1; ++i) { contacts[i] = contacts[i + 1]; } - numContacts; + numContacts--; cout << "contact deleted" << endl; } else { |