-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstd_stack.cpp
More file actions
43 lines (35 loc) · 810 Bytes
/
std_stack.cpp
File metadata and controls
43 lines (35 loc) · 810 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
/*
* =====================================================================================
*
* Filename: Stack.cpp
*
* Description:
*
* Version: 1.0
* Created: 2016年06月06日 15时06分25秒
* Last Modified: 2018-01-19 09:58:30
* Revision: none
* Compiler: gcc
*
* Author: zt (),
* Organization:
*
* =====================================================================================
*/
#include <iostream>
#include <stack>
#include <string>
int main ( int argc, char* argv[] )
{
( void ) argc;
( void ) argv;
std::stack<std::string> mystack;
mystack.emplace ( "first" );
mystack.emplace ( "second" );
while ( !mystack.empty() )
{
std::cout << mystack.top() << std::endl;
mystack.pop();
}
return 0;
}