diff options
| author | rPatrickWarner <[email protected]> | 2024-02-10 11:51:27 -0800 |
|---|---|---|
| committer | rPatrickWarner <[email protected]> | 2024-02-10 11:51:27 -0800 |
| commit | e113e6ac9b71e6f5cfa878712c71c30d6ddbb495 (patch) | |
| tree | 8d0c55cb54b79bc486bc2cf4f82ae84fef76e6ea | |
| parent | init (diff) | |
| download | lab-01-reecepwarner-e113e6ac9b71e6f5cfa878712c71c30d6ddbb495.tar.xz lab-01-reecepwarner-e113e6ac9b71e6f5cfa878712c71c30d6ddbb495.zip | |
more changes
| -rw-r--r-- | Lab1/Lab1/Helpers.cpp | 17 | ||||
| -rw-r--r-- | Lab1/Lab1/Helpers.h | 14 | ||||
| -rw-r--r-- | Lab1/Lab1/Lab1.vcxproj | 4 | ||||
| -rw-r--r-- | Lab1/Lab1/Lab1.vcxproj.filters | 8 | ||||
| -rw-r--r-- | Lab1/Lab1/program.cpp | 11 |
5 files changed, 50 insertions, 4 deletions
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 <iostream> +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 @@ </Link> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="Helpers.cpp" /> <ClCompile Include="program.cpp" /> </ItemGroup> + <ItemGroup> + <ClInclude Include="Helpers.h" /> + </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> 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 @@ <ClCompile Include="program.cpp"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="Helpers.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="Helpers.h"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> </Project>
\ 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 <iostream> +#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); |