Programming/STL
stack
쾌변용자
2010. 11. 16. 16:01
///////////////////////////////////////////////////////////////////////////////
//STL( stack )
///////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <stack>
using namespace std;
void main()
{
stack<int> stack1;
//추가
stack1.push(5);
stack1.push(3);
stack1.push(7);
//삭제
cout << stack1.top() << endl;
stack1.pop();
cout << stack1.top() << endl;
stack1.pop();
cout << stack1.top() << endl;
}