aboutsummaryrefslogtreecommitdiff
path: root/Project1/program.cpp
blob: 135546ca2ea5216abd82a95dab98eb63e4603b5f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// name: Connor McDowell
// date: 2/10/2024
// class: CST116
// reason: homework number 5

#include "Contacts.h"
#include <iostream>

using std::cin;
using std::cout;
using std::endl;


//
//
//int main()
//{
//
//
//
//
//
//	return 0;
//}

int main()
{
    constexpr size_t MAX = 10;
    int O = 1;
    contact newContact;
    while (O == 1)
    {
        int c = 0;
        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, MAX);
        }
        if (c == 2)
        {
            update(&newContact, MAX);
        }
        if (c == 3)
        {
            printAll(newContact, MAX);
        }
        if (c == 4)
        {
            O = 0;
        }
    }
}