print stack c 2b 2b

Solutions on MaxInterview for print stack c 2b 2b by the best coders in the world

showing results for - "print stack c 2b 2b"
Lylia
27 Mar 2016
1while(!myStack.empty()) {
2	cout << myStack.top() << " ";
3	myStack.pop();
4}
Luciano
07 Oct 2016
1void printStack(stack<int> s){
2	while(!s.empty()){
3      cout<<s.top()<<" ";
4      s.pop();
5    }
6    cout<<"\n";
7}