&在C伪码函数中表达的是什么意思?
//插入元素e为新的栈顶元素SqStack Push(SqStack &S, int e) {
if (S.top - S.base >= S.stacksize) {
//栈满追加存储空间
S.base = (int *)realloc(S.base, (S.stacksize + STACKINCREMENT) * sizeof(int));
}
if (!S.base) {
//存储分配失败
exit(ERROR);
}
S.top = S.base + S.stacksize;
S.stacksize += STACKINCREMENT;
printf_s("e=%d\n", e);
*S.top++ = e;
printf_s("*(S.top)=%d\n", *(S.top - 1));
return S;
} &S c++中传址。
页:
[1]