From 7b48ea6ead5d441bb2ed02e766cd95be7d2b91fb Mon Sep 17 00:00:00 2001 From: Leif Messinger Date: Sun, 20 Aug 2023 11:09:58 -0500 Subject: [PATCH] Added more examples --- main.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/main.cpp b/main.cpp index b1d8e4c..c982ce0 100644 --- a/main.cpp +++ b/main.cpp @@ -22,5 +22,24 @@ int main() ArrayStats::getStats(list2.begin(), list2.end()).print(); + std::cout << std::endl; + + const int num = 4; + const int* list3 = # + + ArrayStats::getStats(list3, list3+1).print(); + + std::cout << std::endl; + + const int list4[] = {4, 8, 5, 1, 1, 2}; + + ArrayStats::getStats(&(list4[0]), &(list4[6])).print(); //I don't think the template likes arrays. This should be safe btw + + std::cout << std::endl; + + const int* list5 = list4; + + ArrayStats::getStats(list5, list5 + 6).print(); //It should be fine with pointer arrays tho + return 0; }