aboutsummaryrefslogtreecommitdiff
path: root/Homework5/program.cpp
diff options
context:
space:
mode:
authorAsahel <[email protected]>2024-02-12 18:03:30 -0800
committerAsahel <[email protected]>2024-02-12 18:03:30 -0800
commit36c4160b5a2a4734eda79ac04d216f003c4b8368 (patch)
tree9ee8308267f213daff33456875bddbdcbe7cad10 /Homework5/program.cpp
parentAdded new files. (diff)
downloadhomework-5-asahellt-36c4160b5a2a4734eda79ac04d216f003c4b8368.tar.xz
homework-5-asahellt-36c4160b5a2a4734eda79ac04d216f003c4b8368.zip
Saving workHEADmain
Diffstat (limited to 'Homework5/program.cpp')
-rw-r--r--Homework5/program.cpp52
1 files changed, 44 insertions, 8 deletions
diff --git a/Homework5/program.cpp b/Homework5/program.cpp
index f026a4b..c08993f 100644
--- a/Homework5/program.cpp
+++ b/Homework5/program.cpp
@@ -3,12 +3,48 @@
// Class: CST 116
// Assignment: Homework 5
-struct Contact
+#include <iostream>
+#include <cstdlib>
+#include "Contacts.h"
+
+using std::cout;
+using std::cin;
+using std::endl;
+
+int main()
{
- char Namr[25] = {};
- char Email[100] = {};
- char StreetAddress[35] = {};
- char City[30] = {};
- char State[2] = {};
- int Zip = 0;
-}; \ No newline at end of file
+ const int MAX = 10;
+
+ Contact contacts[MAX] = {};
+ int numberOfContacts = 0;
+
+ char c = 'n';
+
+ do {
+ system("cls");
+ cout << "1. Add New Contact\n";
+ cout << "2. Update Contact\n";
+ cout << "3. Print Contacts\n";
+ cout << "Press 'x' to Exit\n\n";
+ std::cin >> c;
+ switch (c)
+ {
+ case '1':
+ contacts[numberOfContacts++] = InputNewContact();
+ break;
+ case '2':
+
+
+ break;
+ case '3':
+ break;
+ case 'x':
+ break;
+ default:
+ cout << "\nInvalid\n";
+ }
+
+ } while (c != 'x');
+
+ return 0;
+} \ No newline at end of file