aboutsummaryrefslogtreecommitdiff
path: root/Project1/main.cpp
diff options
context:
space:
mode:
authorConnor McDowell <[email protected]>2024-02-15 17:14:12 -0800
committerConnor McDowell <[email protected]>2024-02-15 17:14:12 -0800
commit16cc25c98bfa077ee8f0b231f52f914c093fed22 (patch)
tree7e0b288d3ba6d1828a428c2be020c1970aed83e9 /Project1/main.cpp
parentprint and double created (diff)
downloadin-class-exercise-12-connormcdowell275-16cc25c98bfa077ee8f0b231f52f914c093fed22.tar.xz
in-class-exercise-12-connormcdowell275-16cc25c98bfa077ee8f0b231f52f914c093fed22.zip
included memset from string.h in c_array.cpp
Diffstat (limited to 'Project1/main.cpp')
-rw-r--r--Project1/main.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Project1/main.cpp b/Project1/main.cpp
index 5dd3c7c..7862a8b 100644
--- a/Project1/main.cpp
+++ b/Project1/main.cpp
@@ -16,12 +16,16 @@ int main()
constexpr size_t SIZE = 101;
int* array = new int[SIZE];
- PrintArray(array, SIZE);
+ for (auto i = 0u; i < SIZE; ++i)
+ {
+ array[i] = static_cast<int>(i);
+ }
- DoubleArraySize(array, SIZE);
PrintArray(array, SIZE);
+ DoubleArraySize(array, SIZE);
+
delete[] array;
return 0;
} \ No newline at end of file