#include <iostream>
#include <stack>
#include <string>
using namespace std;
void test1() {stack<int> s;s.push(10);s.push(20);s.push(30);while (s.size()) {cout << "stack top is" << s.top() << endl; // 棧頂s.pop(); // 出棧}
}
int main()
{test1();return 0;
}
stack 容器是一種棧的結構, 先進后出,不支持遍歷,沒有迭代器
stack 不支持排序