///////////////////////////////////////////////////////////////////////////////
//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;
}


+ Recent posts