diff options
| author | Connor McDowell <[email protected]> | 2024-03-04 18:31:25 -0800 |
|---|---|---|
| committer | Connor McDowell <[email protected]> | 2024-03-04 18:31:25 -0800 |
| commit | 2dd34978047a0602f89417343c69e8701c3c63a4 (patch) | |
| tree | 0b9396f18138a6b2e1c8103c35d78b4d91f2c403 /Project1/program.cpp | |
| parent | tested potiential issue, did not fix (diff) | |
| download | homework-7-connormcdowell275-2dd34978047a0602f89417343c69e8701c3c63a4.tar.xz homework-7-connormcdowell275-2dd34978047a0602f89417343c69e8701c3c63a4.zip | |
exception fixed
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); |