diff options
| author | Connor McDowell <[email protected]> | 2024-02-26 17:27:00 -0800 |
|---|---|---|
| committer | Connor McDowell <[email protected]> | 2024-02-26 17:27:00 -0800 |
| commit | 043a2514df09529856db668d2f585809cac46d81 (patch) | |
| tree | dd1cd9852de0837e2aaf57e135dfde509255a118 /Project1 | |
| parent | testing. will finish later in the week (diff) | |
| download | homework-7-connormcdowell275-043a2514df09529856db668d2f585809cac46d81.tar.xz homework-7-connormcdowell275-043a2514df09529856db668d2f585809cac46d81.zip | |
list of contacts created
Diffstat (limited to 'Project1')
| -rw-r--r-- | Project1/Contacts.h | 26 | ||||
| -rw-r--r-- | Project1/program.cpp | 5 |
2 files changed, 17 insertions, 14 deletions
diff --git a/Project1/Contacts.h b/Project1/Contacts.h index f453350..d485659 100644 --- a/Project1/Contacts.h +++ b/Project1/Contacts.h @@ -83,19 +83,19 @@ public: size_t Size() const; }; -struct contact_struct -{ - int a = 0; - size_t id = contact_list::get_length; - size_t count = 0; - char Name[30]; - char Email[105]; - char StreetAddress[45]; - char City[35]; - char State[4]; - int Zip = 0; - contact() : a(true), id(0), count(0), Zip(0) {} -}; +//struct contact_struct +//{ +// int a = 0; +// size_t id = contact_list::get_length; +// size_t count = 0; +// char Name[30]; +// char Email[105]; +// char StreetAddress[45]; +// char City[35]; +// char State[4]; +// int Zip = 0; +// contact() : a(true), id(0), count(0), Zip(0) {} +//}; //struct contact //{ diff --git a/Project1/program.cpp b/Project1/program.cpp index 0ce584e..d8bcec1 100644 --- a/Project1/program.cpp +++ b/Project1/program.cpp @@ -18,7 +18,10 @@ int main() int O = 1; /* t = index counter*/ contact newContact; - size_t t = 0; + 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); |