diff options
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 |