/*
vector
function template
programmer:qpz
*/
#include <iostream>
#include <vector>
#define MAX 10
using namespace std;
class Myclass{
private:
vector <int> vel;//可均分的动态数组
public:
void Add(int x)
{
vel.push_back(x);
}
void print();
};
void Myclass::print()
{
vector <int>::iterator it;
for(it=vel.begin();it<vel.end();it++)
cout<<*it<<endl;
}
int main(void)
{
Myclass my;
int i;
for(i=0;i<MAX;i++)
my.Add(i);
my.print();
cout<<endl;
return 0;
}