how to print stack string value in c++ code example
Example: print stack c++
while(!myStack.empty()) {
cout << myStack.top() << " ";
myStack.pop();
}
while(!myStack.empty()) {
cout << myStack.top() << " ";
myStack.pop();
}