From 0701f875cc5cf358b644dd9b53f462d12968ea7d Mon Sep 17 00:00:00 2001 From: Connor McDowell Date: Sun, 18 Feb 2024 14:10:00 -0800 Subject: still sorting out errors --- Project1/program.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'Project1/program.cpp') 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) { -- cgit v1.2.3