void shiftStacks(){
		if(oldStack.isEmpty()){
			while(!newStack.isEmpty())
				oldStack.push(newStack.pop());
		}
	}
Exemplo n.º 2
0
void showStack(stack<T> temp){
	cout << "stack from top" << endl;
	while (!temp.isEmpty())
		cout << temp.pop() << " " << endl;
	cout << endl;
}