Answers for "print stack c++"

C++
0

print stack c++

while(!myStack.empty()) {
	cout << myStack.top() << " ";
	myStack.pop();
}
Posted by: Guest on April-09-2021
0

print stack c++

void printStack(stack<int> s){
	while(!s.empty()){
      cout<<s.top()<<" ";
      s.pop();
    }
    cout<<"\n";
}
Posted by: Guest on October-08-2021

Browse Popular Code Answers by Language