aboutsummaryrefslogtreecommitdiff
path: root/Project1/program.cpp
diff options
context:
space:
mode:
authorConnor McDowell <[email protected]>2024-02-21 16:17:47 -0800
committerConnor McDowell <[email protected]>2024-02-21 16:17:47 -0800
commita10ee9a9bc8e1a086e112a1e381b63d4a4c96112 (patch)
tree2cff8a565810dd99348c2447c884b6dde7a20393 /Project1/program.cpp
parentstill testing (diff)
downloadhomework-6-connormcdowell275-a10ee9a9bc8e1a086e112a1e381b63d4a4c96112.tar.xz
homework-6-connormcdowell275-a10ee9a9bc8e1a086e112a1e381b63d4a4c96112.zip
pushing
Diffstat (limited to 'Project1/program.cpp')
-rw-r--r--Project1/program.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/Project1/program.cpp b/Project1/program.cpp
index 1f6c0c4..acf6c8a 100644
--- a/Project1/program.cpp
+++ b/Project1/program.cpp
@@ -20,7 +20,7 @@ int main()
size_t t = 0;
contact* newContact = new contact[MAX];
int length = sizeof(newContact[MAX]);
- cout << sizeof(newContact) << endl;
+ cout << sizeof(newContact[MAX]) << endl;
while (O == 1)
{
cout << MAX << endl;
@@ -33,6 +33,11 @@ int main()
cout << "5. Quit\n";
cout << "\nEnter your choice: " << endl;
cin >> c;
+ if (t == MAX)
+ {
+ newContact[MAX] = contact_double(newContact, MAX, t);
+ //MAX = max_double(MAX);
+ }
if (c == 1)
{
addNew(&newContact[MAX], MAX, t);
@@ -56,12 +61,6 @@ int main()
delete[] newContact;
//abort;
}
- ++t;
- if (t >= MAX)
- {
- newContact[MAX] = contact_double(newContact, MAX, t);
- //MAX = max_double(MAX);
- }
}
return 0;
} \ No newline at end of file