template<class Type>
linkedStackType::reverseStack(linkedStackType<Type> stack2)
{
nodeType *tmp = this->stackTop; //pointer tothe current stack top
while(tmp->link != NULL) //unwind till link is null
{
stack2.push(tmp->info); //push current element info to stack2
tmp = tmp->link; //fall back one level
if(tmp->link == NULL) // last element in stack
stack2.push(tmp->info); //push last element
}
}