#include <iostream>
using namespace std;
#include <queue>
#define N 10
int main() {
queue<int> que;
for (int i = 0; i < N; i++)
{
que.push(i);
cout << que.back() << "准备入队" << endl;
}
cout << "que size: " << que.size() << endl;
for (int i = 0; i < N; i++)
{
cout << "准备出队" << que.front() << endl;
que.pop();
}
cout << "que size: " << que.size() << endl;
system("pause");
return 0;
}
网友评论