From ed19ed0912533a3e823938542ad5b4d58e93b03a Mon Sep 17 00:00:00 2001 From: Connor McDowell Date: Wed, 21 Feb 2024 15:10:01 -0800 Subject: still testing --- Project1/program.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Project1/program.cpp') diff --git a/Project1/program.cpp b/Project1/program.cpp index 8b542f1..1f6c0c4 100644 --- a/Project1/program.cpp +++ b/Project1/program.cpp @@ -16,10 +16,15 @@ int main() { size_t MAX = 3; int O = 1; + /* t = index counter*/ size_t t = 0; contact* newContact = new contact[MAX]; + int length = sizeof(newContact[MAX]); + cout << sizeof(newContact) << endl; while (O == 1) { + cout << MAX << endl; + // c = choice input int c = 0; cout << "1. Enter a contact\n"; cout << "2. Update a contact\n"; @@ -28,7 +33,6 @@ int main() cout << "5. Quit\n"; cout << "\nEnter your choice: " << endl; cin >> c; - //c = menu(); if (c == 1) { addNew(&newContact[MAX], MAX, t); @@ -50,11 +54,13 @@ int main() { O = 0; delete[] newContact; + //abort; } ++t; if (t >= MAX) { - contact_double(newContact, MAX, t); + newContact[MAX] = contact_double(newContact, MAX, t); + //MAX = max_double(MAX); } } return 0; -- cgit v1.2.3