int top_seqstack(SEQSTACK *head) /*Õ»¶¥ÔªËØ*/ { if(!empty_seqstack(head)) return 0; else return head->data[head->top]; }
void pop_seqstack(seq_pstack s,datatype *d) { if(empty_seqstack(s)){ printf("栈已空!\n"); return ; } *d = s->data[s->top]; s->top--; }
int pop_seqstack(SEQSTACK *head,char *num) /*³öÕ»*/ { if(!empty_seqstack(head)) return 1; else { *num=head->data[head->top]; head->top--; return 0; } }
int print_seqstack(SEQSTACK *head) /*Êä³öÕ»ÄÚÔªËØ*/ { if(!empty_seqstack(head)) return 1; else { int i; printf("µ±Ç°Õ»ÖеÄÔªËØ:"); for(i=head->top;i>=0;i--) printf("%c",head->data[i]); printf("\n"); return 0; } }