#include<iostream>
#include<vector>
#include<string>
using namespace std;
class myclass{ };
void main()
{
string str[]={"Alex","john","Rebort"};
vector<int> v1;
vector<int> v2(10);
vector<float> v3(10,0);
vector <string> v4(str,str+1);
vector <string>::iterator slt=v4.begin();
while (slt!=v4.end()) cout<<*slt++<<" ";
cout<<endl;
vector <myclass> myc;
vector <myclass*> pmyc;
cout<<"myclass sucess"<<endl;
system("pause");
}
容器+<类名>+对象名
template <class T>
class Show
{
public:
void operator()
}
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
void print(vector <int>&v);
void main()
{
int ary[3]={1,2,3};
vector<int>v1(ary,ary+4);
v1.reserve(5);
vector<int>v2;
v2.reserve(5);
copy(ary,ary+3,v2.begin() );
system("pause");
}