(ACM模板)栈stack

#include<iostream>
#include<cstdio>
#include<stack>
using namespace std;

stack<int> s;
stack<string> ss;

int main()
{
    int x=1; 
    s.push(x);  //  入栈
    s.pop();    //  出栈
    s.top();    //  访问栈顶
    s.empty();  //  当栈空时,返回true
    s.size();   //  访问栈中元素个数
    
    return 0;
}
原文地址:https://www.cnblogs.com/clno1/p/9681173.html