#include <iostream>
#include <queue>
using namespace std;
void test01() {
queue<int> q;
q.push(10);
q.push(20);
q.push(30);
q.push(40);
while (q.empty() == false) {
cout << " 队头: " << q.front() << endl;
cout << " 队尾: " << q.back() << endl;
q.pop();
}
}
int main() {
test01();
return EXIT_SUCCESS;
}