diff options
| author | Connor McDowell <[email protected]> | 2024-02-18 14:10:00 -0800 |
|---|---|---|
| committer | Connor McDowell <[email protected]> | 2024-02-18 14:10:00 -0800 |
| commit | 0701f875cc5cf358b644dd9b53f462d12968ea7d (patch) | |
| tree | 8b06381c8a96214471c3f94a566c16c2a699fe31 /Project1/program.cpp | |
| parent | couts added to help guide inputs (WIP) (diff) | |
| download | homework-5-connormcdowell275-0701f875cc5cf358b644dd9b53f462d12968ea7d.tar.xz homework-5-connormcdowell275-0701f875cc5cf358b644dd9b53f462d12968ea7d.zip | |
still sorting out errors
Diffstat (limited to 'Project1/program.cpp')
| -rw-r--r-- | Project1/program.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Project1/program.cpp b/Project1/program.cpp index c97ba49..135546c 100644 --- a/Project1/program.cpp +++ b/Project1/program.cpp @@ -25,23 +25,30 @@ using std::endl; int main() { + constexpr size_t MAX = 10; int O = 1; - contact newContact[10]; + contact newContact; while (O == 1) { int c = 0; - c = menu(); + cout << "1. Enter a name\n"; + cout << "2. Delete a name\n"; + cout << "3. List the file\n"; + cout << "4. Quit\n"; + cout << "\nEnter your choice: "; + cin >> c; + //c = menu(); if (c == 1) { - addNew(&newContact[]); + addNew(&newContact, MAX); } if (c == 2) { - update(&newContact[]); + update(&newContact, MAX); } if (c == 3) { - printAll(&newContact[]); + printAll(newContact, MAX); } if (c == 4) { |