From 16cc25c98bfa077ee8f0b231f52f914c093fed22 Mon Sep 17 00:00:00 2001 From: Connor McDowell Date: Thu, 15 Feb 2024 17:14:12 -0800 Subject: included memset from string.h in c_array.cpp --- Project1/main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Project1/main.cpp') 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(i); + } - DoubleArraySize(array, SIZE); PrintArray(array, SIZE); + DoubleArraySize(array, SIZE); + delete[] array; return 0; } \ No newline at end of file -- cgit v1.2.3