queue

 1 #include <stdio.h>
 2 #include <string.h>
 3 #include <queue>
 4 #include <algorithm>
 5 using namespace std;
 6 
 7 int main()
 8 {
 9     queue <int> que;
10     while(que.size())
11         que.pop();
12     que.push(1);
13     que.push(2);
14     que.push(3);
15     printf("%d
",que.front());
16     que.pop();
17     printf("%d
",que.front());
18     que.pop();
19     printf("%d
",que.front());
20     return 0;
21 }
View Code
原文地址:https://www.cnblogs.com/cyd308/p/4771323.html