From e113e6ac9b71e6f5cfa878712c71c30d6ddbb495 Mon Sep 17 00:00:00 2001 From: rPatrickWarner Date: Sat, 10 Feb 2024 11:51:27 -0800 Subject: more changes --- Lab1/Lab1/Helpers.cpp | 17 +++++++++++++++++ Lab1/Lab1/Helpers.h | 14 ++++++++++++++ Lab1/Lab1/Lab1.vcxproj | 4 ++++ Lab1/Lab1/Lab1.vcxproj.filters | 8 ++++++++ Lab1/Lab1/program.cpp | 11 +++++++---- 5 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 Lab1/Lab1/Helpers.cpp create mode 100644 Lab1/Lab1/Helpers.h diff --git a/Lab1/Lab1/Helpers.cpp b/Lab1/Lab1/Helpers.cpp new file mode 100644 index 0000000..7a8a2c5 --- /dev/null +++ b/Lab1/Lab1/Helpers.cpp @@ -0,0 +1,17 @@ +#include "Helpers.h" +#include +using std::cin; +using std::endl; +using std::cout; + + + + +void Print(int(&cArray)[SIZE]) +{ + + for (auto element : cArray) + cout << element << endl; + + +} \ No newline at end of file diff --git a/Lab1/Lab1/Helpers.h b/Lab1/Lab1/Helpers.h new file mode 100644 index 0000000..e9f2de6 --- /dev/null +++ b/Lab1/Lab1/Helpers.h @@ -0,0 +1,14 @@ +#ifndef CONTAINER_HELPERS_H + +#define CONTAINER_HELPERS_H + + +constexpr int SIZE = 12000; + + +void Print(int(&cArray)[SIZE]); + + + + +#endif diff --git a/Lab1/Lab1/Lab1.vcxproj b/Lab1/Lab1/Lab1.vcxproj index 16b9340..952455e 100644 --- a/Lab1/Lab1/Lab1.vcxproj +++ b/Lab1/Lab1/Lab1.vcxproj @@ -127,8 +127,12 @@ + + + + diff --git a/Lab1/Lab1/Lab1.vcxproj.filters b/Lab1/Lab1/Lab1.vcxproj.filters index a1fa30d..ae895f6 100644 --- a/Lab1/Lab1/Lab1.vcxproj.filters +++ b/Lab1/Lab1/Lab1.vcxproj.filters @@ -18,5 +18,13 @@ Source Files + + Source Files + + + + + Header Files + \ No newline at end of file diff --git a/Lab1/Lab1/program.cpp b/Lab1/Lab1/program.cpp index 9b0d318..3f1d62b 100644 --- a/Lab1/Lab1/program.cpp +++ b/Lab1/Lab1/program.cpp @@ -4,6 +4,7 @@ //CST 116 #include +#include "Helpers.h" using std::cin; using std::cout; @@ -13,14 +14,16 @@ int main() { + int cArray[SIZE]{}; + for (int i = 0; i < SIZE; i++) + { + cArray[i] = i; + } - - - - + Print(cArray); -- cgit v1.2.3