正在加载图片...
取栈顶 int GetTop( linkStack*S, StackData &x)i if( StackEmpty(S)) return 0; X=S->top->data return 1 置栈空 int MakeEmpty( LinkStack *S)t While(s->top!=NULL StackNode x p=S->top S->top=S-top ->ink; free(p);▪ 取栈顶 int GetTop ( LinkStack *S, StackData &x ) { if ( StackEmpty (S) ) return 0; x = S->top->data; return 1; } ▪ 置栈空 int MakeEmpty ( LinkStack *S) { While(S->top!=NULL){ StackNode * p = S->top; S->top = S->top ->link; free(p); } }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有