#include<iostream>
#include<vector>
using namespace std;
void print(vector<int>::iterator first, vector<int>::iterator last)
{
if (first != last)
{
cout << *first << " ";
print(++first, last);
}
}
int main()
{
vector<int>vec{ 1, 2, 3, 4, 5, 6, 7, 8, 9 };
print(vec.begin(), vec.end());
return 0;
}
6.33
最新推荐文章于 2024-07-03 14:24:17 发布