STL Container - Container Adapter
stack
#include <stack>ꡬ쑰
μμ
#include <iostream>
#include <stack>
using namespace std;
int main(void){
stack<int> st;
int decimal = 123;
do {
st.push(decimal % 2);
decimal /= 2;
}while(decimal);
while(!st.empty()){
cout << st.top();
st.pop();
}
return 0;
}queue
ꡬ쑰
μμ
priority queue
μμ
μ°Έμ‘°
Last updated