aboutsummaryrefslogtreecommitdiff
path: root/Project1/program.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Project1/program.cpp')
-rw-r--r--Project1/program.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/Project1/program.cpp b/Project1/program.cpp
index c7a776f..4d4d6f6 100644
--- a/Project1/program.cpp
+++ b/Project1/program.cpp
@@ -5,6 +5,8 @@
#include "Contact_list.h"
#include <iostream>
+#include <string.h>
+#include <stdio.h>
using std::cin;
using std::cout;
@@ -24,7 +26,7 @@ int main()
size_t t = 0;
contacts.set_size(MAX);
- cout << contacts.get_size() << endl;
+ //cout << contacts.get_size() << endl;
while (O == 1)
{
contact_struct save_contacts;
@@ -32,7 +34,7 @@ int main()
// c = choice input
int c = 0;
cout << "1. Enter a contact\n";
- cout << "2. Update a contact\n";
+ cout << "2. Copy all contacts\n";
cout << "3. print all contacts\n";
cout << "4. Delete a contact\n";
cout << "5. Quit\n";
@@ -42,7 +44,7 @@ int main()
{
case 1:
//addNew(newContact, MAX, t);
- contacts.AddContact(newContact, t, save_contacts);
+ contacts.AddContact(newContact, t, save_contacts, contacts);
//addContact(newContact, contacts.get_size(), contacts[MAX]);
//for (auto i = 0u; i < MAX; ++i)
//{
@@ -91,7 +93,8 @@ int main()
break;
case 2:
//contacts.Update(newContact);
- cout << "this program is currently a work in progress" << endl;
+ //cout << "this program is currently a work in progress" << endl;
+ contacts.CopyList(newContact, contacts.get_size());
break;
case 3:
contacts.Print(); // Print only the existing contacts