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\n",que.front());
16     que.pop();
17     printf("%d\n",que.front());
18     que.pop();
19     printf("%d\n",que.front());
20     return 0;
21 }
View Code

 

posted @ 2015-08-30 18:40  cyd2014  阅读(123)  评论(0编辑  收藏  举报