#include <iostream>
#include <queue>
using namespace std;
class Person
{
public:
Person (string name, int age)
{
this->m_name = name;
this->m_age = age;
}
string m_name;
int m_age;
};
void test01 ()
{
queue<Person> q;
Person p1("tangsheng", 99);
Person p2("shasheng", 100);
Person p3("sunwukong", 120);
Person p4("zhubajie", 130);
q.push(p1);
q.push(p2);
q.push(p3);
q.push(p4);
while (!q.empty())
{
cout << q.front().m_name << " " << q.front().m_age << endl;
q.pop();
}
cout << endl;
cout << q.size() << endl;
}
int main ()
{
test01();
return 0;
}