#include<stack>
#include<vector>
using namespace std;
int main(){
stack <int> a;
stack <double> b;
stack <int, vector <int> > c; // 选用vector
stack <int> d( a);
}
#include<stack>
#include<iostream>
using namespace std;
int main(){
stack <int> a;
//栈顶插入
a.push( 4);
a.push( 1);
a.push( 3);
a.push( 2);
while( a.size() != 0){
cout << "a.top() is " << a.top() << endl;//引用栈顶元素
a.pop();//删除栈顶元素
}//后入先出 LIFO
//a.empty return ture or false
if( a.empty()) cout << "stack is empty" << endl;
}