diff options
| author | Connor McDowell <[email protected]> | 2024-02-15 18:15:09 -0800 |
|---|---|---|
| committer | Connor McDowell <[email protected]> | 2024-02-15 18:15:09 -0800 |
| commit | ccb813aa7c40a9edcd4096ce80024fe1cf4ab910 (patch) | |
| tree | d9c40d51c283627df6e52564473a69214630e2c2 /Project1/c_array.cpp | |
| parent | testing to set indexes > 101 to 0. but theres LITERALLY no instruction in the... (diff) | |
| download | in-class-exercise-12-connormcdowell275-ccb813aa7c40a9edcd4096ce80024fe1cf4ab910.tar.xz in-class-exercise-12-connormcdowell275-ccb813aa7c40a9edcd4096ce80024fe1cf4ab910.zip | |
finished
Diffstat (limited to 'Project1/c_array.cpp')
| -rw-r--r-- | Project1/c_array.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Project1/c_array.cpp b/Project1/c_array.cpp index 962c785..d6b006d 100644 --- a/Project1/c_array.cpp +++ b/Project1/c_array.cpp @@ -1,7 +1,7 @@ #include <iostream> #include <ostream> #include "c_array.h" -#include <string.h> + using std::cin; using std::cout; @@ -24,10 +24,11 @@ void DoubleArraySize(int*& array, size_t SIZE) //memset(array, 0, SIZE * sizeof(array)); SIZE *= 2; - //for (auto i = 102u; i < SIZE; ++i) - //{ - // memset(array, 0, SIZE * sizeof(array)); - //} + for (auto i = 101u; i < SIZE; ++i) + { + array[i] = 0; + } + PrintArray(array, SIZE); } |