한가지 특이한 점은 top을 써야되고 pop은 void return이라는 점
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #include <stack> using namespace std; int main() { stack<int> tmp; tmp.push(3); tmp.push(4); cout << tmp.size() << endl; int t = tmp.top(); cout << t << endl; tmp.pop(); while(1){} return 0; } | cs |
'2019 > c++' 카테고리의 다른 글
연산자와 비트 연산 (0) | 2018.04.13 |
---|---|
자료구조 요점정리 (0) | 2018.04.02 |
IO (0) | 2018.03.30 |
File I/O (0) | 2018.03.30 |
STL Queues (0) | 2018.03.28 |