-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstd_queue.cpp
More file actions
46 lines (39 loc) · 812 Bytes
/
std_queue.cpp
File metadata and controls
46 lines (39 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* =====================================================================================
*
* Filename: Queue.cpp
*
* Description:
*
* Version: 1.0
* Created: 2017年02月23日 16时44分49秒
* Last Modified: 2018-03-09 08:21:14
* Revision: none
* Compiler: gcc
*
* Author: zt (),
* Organization:
*
* =====================================================================================
*/
#include <iostream>
#include <queue>
int main ( int argc, char* argv[] )
{
( void ) argc;
( void ) argv;
std::queue<int> myqueue;
int myint;
do
{
std::cin >> myint;
myqueue.push ( myint );
}
while ( myint );
while ( !myqueue.empty() )
{
std::cout << ' ' << myqueue.front();
myqueue.pop();
}
return 0;
}