#include <iostream>
#include <vector>
#include<algorithm>
#include<string>
using namespace std;
class Person
{
public:
string m_Name;
int m_Age;
Person(string name, int age)
{
m_Name = name;
m_Age = age;
}
};
void test01()
{
vector<Person> v;
vector<Person*> v2;
Person p1("Tom", 10);
Person p2("Lisa", 15);
Person p3("Richard", 12);
Person p4("Mike", 28);
v.push_back(p1);
v.push_back(p2);
v.push_back(p3);
v.push_back(p4);
v2.push_back(&p1);
v2.push_back(&p2);
v2.push_back(&p3);
v2.push_back(&p4);
for (vector<Person>::iterator it = v.begin(); it != v.end(); it