I have this reverse method on my stack that reverses the elements inside the stack to a tmpStack. I want to know how to assign tmpStack to my original stack. I did not find a way to assign my original stack to that value so it can show up when I use print and not just print tmpStack. My problem is in the last lines.
template<class T>
void stack<T>::reverse(){
T item;
stack<T> tmpStack;
while (empty() == false)
{
item = stack<T>::pop();
tmpStack.push(item);
}
stack<T> = tmpStack;
}