特性
一头进一头出 像水管
拷贝
void text04() {
//默认构造函数
queue<int> q1;
queue<int> q2(q1);//拷贝
queue<int> q3 = q1;//赋值
}
删除、队头、队尾、入队、大小
void text05() {
queue<int>q;
cout << "q.empty():" << q.empty() <<endl;
//入队
q.push(11);
q.push(22);
q.push(33);
cout << "q.empty()" << q.empty()<<endl;
cout << "q.size()" << q.size() << endl;
int i = q.front();//对头
int i2 = q.back();//队尾
q.pop();//删除对头元素
}