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