diff options
Diffstat (limited to 'Project1/program.cpp')
| -rw-r--r-- | Project1/program.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Project1/program.cpp b/Project1/program.cpp index 5b28a17..50b0723 100644 --- a/Project1/program.cpp +++ b/Project1/program.cpp @@ -43,15 +43,15 @@ int main() //addContact(newContact, contacts.get_size(), contacts[MAX]); for (auto i = 0u; i < MAX; ++i) { - char firstName[30]; - char lastName[30]; - char Email[105]; - char StreetAddress[45]; - char City[35]; - char State[4]; + char firstName[30] = {}; + char lastName[30] = {}; + char Email[105] = {}; + char StreetAddress[45] = {}; + char City[35] = {}; + char State[4] = {}; int Zip = 0; newContact.Set_a(0); - newContact.Set_id(i + 1); + //newContact.Set_id(i + 1); //newContact[i].count = t; cin.ignore(1000, '\n'); cout << "Please enter each piece of information when you are prompted to" << endl; @@ -80,9 +80,10 @@ int main() size_t id = i + 1; newContact.Set_id(id); newContact.print(); + contacts.AddContact(newContact); break; } - contacts.AddContact(newContact); + break; case 2: //contacts.Update(newContact); |