* create
```
#include <stack>
using namespace std;
int main() {
stack<int> a; // default constructor
stack<int> b(a); // copy constructor
stack<int> c(move(a)); // move constructor
//stack<int> d{1,2,3}; // stack has no initializer list constructor
//stack<int> e(3,1); // stack has no fill constructor
//stack<int> f(a.begin(),a.end()); // stack has no range constructor
stack<int>* g = new stack<int>(); // new operator
delete g;
}
```
* iterator (N/A)
* add
```
#include <iostream>
#include <stack>
using namespace std;
int main ()
{
stack<int> s;
s.push(1);
s.emplace(3);
while(!s.empty()) {
cout<<s.top()<<",";
s.pop();
}
cout<<endl;
}
// 3,1
```
* change (N/A)
* query
```
#include <stack>
#include <iostream>
using namespace std;
int main() {
stack<int> s;
s.push(1);
cout<<s.top()<<endl;
cout<<s.empty()<<","<<s.size()<<endl;
}
```
* delete
```
#include <stack>
#include <iostream>
using namespace std;
int main() {
stack<int> s;
s.push(1);
cout<<s.top()<<endl;
s.pop();
cout<<s.empty()<<","<<s.size()<<endl;
}
```