e=*(--S.top); 这样做会不会移动==改变top的位置//获取栈顶void GetTop(SqStack S,SElemType &e){if(StackEmpty(S))exit(OVERFLOW);e=*(--S.top);}

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/09 08:14:29

e=*(--S.top); 这样做会不会移动==改变top的位置//获取栈顶void GetTop(SqStack S,SElemType &e){if(StackEmpty(S))exit(OVERFLOW);e=*(--S.top);}
e=*(--S.top); 这样做会不会移动==改变top的位置
//获取栈顶
void GetTop(SqStack S,SElemType &e)
{
if(StackEmpty(S))exit(OVERFLOW);
e=*(--S.top);
}

e=*(--S.top); 这样做会不会移动==改变top的位置//获取栈顶void GetTop(SqStack S,SElemType &e){if(StackEmpty(S))exit(OVERFLOW);e=*(--S.top);}
这个句子就是
S.top=S.top-1;
e = *(S.top);