aboutsummaryrefslogtreecommitdiff
path: root/Project1/program.cpp
diff options
context:
space:
mode:
authorConnor McDowell <[email protected]>2024-02-18 14:25:42 -0800
committerConnor McDowell <[email protected]>2024-02-18 14:25:42 -0800
commit13fbf63f860ad74bbf0e941a8b7d953a1e163b7c (patch)
tree208485ecae6dc1f95408a9786e6ef0081f4420b4 /Project1/program.cpp
parentstill sorting out errors (diff)
downloadhomework-5-connormcdowell275-13fbf63f860ad74bbf0e941a8b7d953a1e163b7c.tar.xz
homework-5-connormcdowell275-13fbf63f860ad74bbf0e941a8b7d953a1e163b7c.zip
after all the testing ive more or less reverted back to what ive done. i have no idea how to complete this at this point without a dynamic array and then it pushes into assignment 6.
Diffstat (limited to 'Project1/program.cpp')
-rw-r--r--Project1/program.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Project1/program.cpp b/Project1/program.cpp
index 135546c..390bb30 100644
--- a/Project1/program.cpp
+++ b/Project1/program.cpp
@@ -27,28 +27,28 @@ int main()
{
constexpr size_t MAX = 10;
int O = 1;
- contact newContact;
+ contact newContact[MAX];
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 << "1. Enter a contact\n";
+ cout << "2. Update a contact\n";
+ cout << "3. print all contacts\n";
cout << "4. Quit\n";
- cout << "\nEnter your choice: ";
+ cout << "\nEnter your choice: " << endl;
cin >> c;
//c = menu();
if (c == 1)
{
- addNew(&newContact, MAX);
+ addNew(newContact[], MAX);
}
if (c == 2)
{
- update(&newContact, MAX);
+ update(newContact[], MAX);
}
if (c == 3)
{
- printAll(newContact, MAX);
+ printAll(newContact[], MAX);
}
if (c == 4)
{