diff options
| author | Connor McDowell <[email protected]> | 2024-02-18 14:28:42 -0800 |
|---|---|---|
| committer | Connor McDowell <[email protected]> | 2024-02-18 14:28:42 -0800 |
| commit | a0a12a03f35034ba45c212a8bf24027cc4ea7b92 (patch) | |
| tree | 1ef444a125d59426f5857301fb69281a8d48889c /Project1 | |
| parent | after all the testing ive more or less reverted back to what ive done. i have... (diff) | |
| download | homework-5-connormcdowell275-a0a12a03f35034ba45c212a8bf24027cc4ea7b92.tar.xz homework-5-connormcdowell275-a0a12a03f35034ba45c212a8bf24027cc4ea7b92.zip | |
its fixed ???? testing
Diffstat (limited to 'Project1')
| -rw-r--r-- | Project1/Contacts.h | 6 | ||||
| -rw-r--r-- | Project1/contacts.cpp | 16 | ||||
| -rw-r--r-- | Project1/program.cpp | 6 |
3 files changed, 14 insertions, 14 deletions
diff --git a/Project1/Contacts.h b/Project1/Contacts.h index 841233d..60e4dcb 100644 --- a/Project1/Contacts.h +++ b/Project1/Contacts.h @@ -21,11 +21,11 @@ struct contact int menu(); -char addNew(contact newContact, size_t MAX); +char addNew(contact newContact[], size_t MAX); -void update(contact newContact, size_t MAX); +void update(contact newContact[], size_t MAX); -void printAll(contact newContact, size_t MAX); +void printAll(contact newContact[], size_t MAX); diff --git a/Project1/contacts.cpp b/Project1/contacts.cpp index 29b2f47..dbb5a23 100644 --- a/Project1/contacts.cpp +++ b/Project1/contacts.cpp @@ -88,16 +88,16 @@ void update(struct contact newContact[], size_t MAX) } -void printAll(contact newContact, size_t MAX) +void printAll(contact newContact[], size_t MAX) { for (int i = 0; i < MAX; ++i) { - cout << newContact.id << endl; - cout << "name: " << newContact.Name << endl; - cout << "Email: " << newContact.Email << endl; - cout << "Address: " << newContact.StreetAddress << endl; - cout << "city" << newContact.City << endl; - cout << "state: " << newContact.State << endl; - cout << "Zip: " << newContact.Zip << endl; + cout << newContact[i].id << endl; + cout << "name: " << newContact[i].Name << endl; + cout << "Email: " << newContact[i].Email << endl; + cout << "Address: " << newContact[i].StreetAddress << endl; + cout << "city" << newContact[i].City << endl; + cout << "state: " << newContact[i].State << endl; + cout << "Zip: " << newContact[i].Zip << endl; } } diff --git a/Project1/program.cpp b/Project1/program.cpp index 390bb30..1d21308 100644 --- a/Project1/program.cpp +++ b/Project1/program.cpp @@ -40,15 +40,15 @@ int main() //c = menu(); if (c == 1) { - addNew(newContact[], MAX); + addNew(&newContact[MAX], MAX); } if (c == 2) { - update(newContact[], MAX); + update(&newContact[MAX], MAX); } if (c == 3) { - printAll(newContact[], MAX); + printAll(&newContact[MAX], MAX); } if (c == 4) { |