From 903d582231befeccae18be5af3b23ee92235d343 Mon Sep 17 00:00:00 2001 From: Connor McDowell Date: Thu, 29 Feb 2024 16:02:20 -0800 Subject: refactoring add new. --- Project1/program.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'Project1/program.cpp') diff --git a/Project1/program.cpp b/Project1/program.cpp index d8bcec1..129284f 100644 --- a/Project1/program.cpp +++ b/Project1/program.cpp @@ -17,15 +17,11 @@ int main() size_t MAX = 3; int O = 1; /* t = index counter*/ - contact newContact; + contact* newContact = new contact[MAX]; contact_list contact_list; - size_t length = contact_list.get_length(); - contact contactArray[length] = { newContact }; + size_t t = 0; - //contact* newContact = new contact[MAX]; - //int length = sizeof(newContact[MAX]); int size = sizeof(newContact); - //cout << sizeof(newContact[MAX]) << endl; while (O == 1) { //cout << MAX << endl; -- cgit v1.2.3