结构体 栈弹出的问题
刘亚涛 2012-12-21 09:35:50 在SeqStack类中写了一个这样的弹出方法
template<class T>
bool SeqStack<T>::Pop(T& x){
if (Isempty()==true) return false;
x=element[top--];
return true;
}
在实现时
Spot GoOut;
stack.Pop(GoOut)
S=GoOut.s;
T=GoOut.t;
是出错 其中Spot是结构体(含是s t属性) 已经确定栈中有元素就是弹出时出错 求告知啊啊啊