diff options
| author | Connor McDowell <[email protected]> | 2024-02-10 13:37:34 -0800 |
|---|---|---|
| committer | Connor McDowell <[email protected]> | 2024-02-10 13:37:34 -0800 |
| commit | a6cbf2ae0d6d953a2e9da7f069c184853fca3cc3 (patch) | |
| tree | 7920404119bc2c64a0699afcc23fa5a5f3b71651 /Project1/helper.cpp | |
| parent | i dunno whats wrong its saying there should be a ; where there shouldnt and e... (diff) | |
| download | lab-01-connormcdowell275-a6cbf2ae0d6d953a2e9da7f069c184853fca3cc3.tar.xz lab-01-connormcdowell275-a6cbf2ae0d6d953a2e9da7f069c184853fca3cc3.zip | |
errors fixed, vectors and lists made, still working on lists
Diffstat (limited to 'Project1/helper.cpp')
| -rw-r--r-- | Project1/helper.cpp | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/Project1/helper.cpp b/Project1/helper.cpp index 85b6ac4..de05926 100644 --- a/Project1/helper.cpp +++ b/Project1/helper.cpp @@ -1,8 +1,14 @@ +#include "helper.h" #include <iostream> #include <array> #include <vector> -#include "helper.h" +#include <list> +using std::cin; +using std::cout; +using std::endl; +using std::array; +using std::vector; void Print(int(&cArray)[SIZE]) @@ -13,10 +19,28 @@ void Print(int(&cArray)[SIZE]) } } -void Print_std(std::array<int, SIZE> stdArray[]) +void Print(const std::array<int, SIZE> &stdArray) { - for (auto i = 0u; i < stdArray->size(); i++) + for (auto i = 0u; i < stdArray.size(); i++) { std::cout << i << std::endl; } } + +void Print(const std::vector<int> &myVector) +{ + for (auto& i : myVector) + { + std::cout << i << std::endl; + } + +} + +void Print(const std::list<int>& myList) +{ + for (auto& i : myList) + { + std::cout << i << std::endl; + } + +}
\ No newline at end of file |