blob: d72ab83c42965a93f2c1c18e3b3516bbba6d1fa0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include <iostream>
#include <vector>
/*
*
* 6.33
*
*
*/
void recursive_vec_print(std::vector<int>::const_iterator cbeg, std::vector<int>::const_iterator cend) {
if(cbeg == cend) {
return;
}
std::cout << *cbeg++ << std::endl;
recursive_vec_print(cbeg, cend);
}
int main () {
std::vector<int> myvec = {1,2,32,44,2,24,1,62,24};
recursive_vec_print(myvec.cbegin(), myvec.cend());
return 0;
}
|