aboutsummaryrefslogtreecommitdiff
path: root/Project1/program.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Project1/program.cpp')
-rw-r--r--Project1/program.cpp17
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)
{