aboutsummaryrefslogtreecommitdiff
path: root/Project1/program.cpp
diff options
context:
space:
mode:
authorConnor McDowell <[email protected]>2024-02-19 16:16:40 -0800
committerConnor McDowell <[email protected]>2024-02-19 16:16:40 -0800
commit1ea9952ccd3168e629600c48d0ffaee53f9cb158 (patch)
tree6290efb7d5ed77e6dc5d3e8cb6ea0ccd094420e1 /Project1/program.cpp
parentadd deadline (diff)
downloadhomework-6-connormcdowell275-1ea9952ccd3168e629600c48d0ffaee53f9cb158.tar.xz
homework-6-connormcdowell275-1ea9952ccd3168e629600c48d0ffaee53f9cb158.zip
.cpps and .hs added
Diffstat (limited to 'Project1/program.cpp')
-rw-r--r--Project1/program.cpp61
1 files changed, 61 insertions, 0 deletions
diff --git a/Project1/program.cpp b/Project1/program.cpp
new file mode 100644
index 0000000..4e62543
--- /dev/null
+++ b/Project1/program.cpp
@@ -0,0 +1,61 @@
+// name: Connor McDowell
+// date: 2/19/2024
+// class: CST116
+// reason: homework number 6
+
+#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;
+ int t = 0;
+ contact newContact[MAX];
+ while (O == 1)
+ {
+ int c = 0;
+ 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: " << endl;
+ cin >> c;
+ //c = menu();
+ if (c == 1)
+ {
+ addNew(&newContact[MAX], MAX, t);
+ ++t;
+ //cout << t << endl;
+ }
+ if (c == 2)
+ {
+ update(&newContact[MAX], MAX);
+ }
+ if (c == 3)
+ {
+ printAll(&newContact[MAX], MAX);
+ }
+ if (c == 4)
+ {
+ O = 0;
+ }
+ }
+} \ No newline at end of file