#include<iostream>
#include<vector>
using namespace std;
template<class T>
void print(vector<T> v)
{
for (vector<T>::iterator it = v.begin(); it != v.end(); it++)
{
cout << *it << " ";
}
cout << endl;
}
void test01()
{
vector<int>v1;
for (int i = 0; i < 10; i++)
{
v1.push_back(i);
}
print(v1);
vector<int>v2(v1.begin(), v1.end());
print(v2);
vector<int>v3(10, 100);
print(v3);
}
int main()
{
test01();
return 0;
}
vector不能再用上模板函数吗