示例#1
0
int top_seqstack(SEQSTACK *head)                                   /*Õ»¶¥ÔªËØ*/
{
    if(!empty_seqstack(head))
        return 0;
    else
        return head->data[head->top];
}
示例#2
0
文件: seqstack.c 项目: kcoewoys/work
void pop_seqstack(seq_pstack s,datatype *d)
{
	if(empty_seqstack(s)){
		printf("栈已空!\n");
		return ;
	}
	*d = s->data[s->top];
	s->top--;
}
示例#3
0
int pop_seqstack(SEQSTACK *head,char *num)                       /*³öÕ»*/
{
    if(!empty_seqstack(head))
        return 1;
    else
    {
        *num=head->data[head->top];
        head->top--;
        return 0;
    }
}
示例#4
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;
    }
}