From 13c97461fde19829569dbe10f53322fef5909b83 Mon Sep 17 00:00:00 2001 From: Oskar Date: Thu, 12 Sep 2024 12:28:48 +0200 Subject: more --- 6p33.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 6p33.cpp (limited to '6p33.cpp') diff --git a/6p33.cpp b/6p33.cpp new file mode 100644 index 0000000..d72ab83 --- /dev/null +++ b/6p33.cpp @@ -0,0 +1,26 @@ +#include +#include + +/* + * + * 6.33 + * + * + */ + +void recursive_vec_print(std::vector::const_iterator cbeg, std::vector::const_iterator cend) { + + if(cbeg == cend) { + return; + } + + std::cout << *cbeg++ << std::endl; + recursive_vec_print(cbeg, cend); +} + +int main () { + + std::vector myvec = {1,2,32,44,2,24,1,62,24}; + recursive_vec_print(myvec.cbegin(), myvec.cend()); + return 0; +} -- cgit v1.2.3