typedef int ElemType;
typedef struct node
{
ElemType data;
struct node *next;
}Stacknode,*LinkStack;
void Init_LinkStack(LinkStack &s)
{
s=(Stacknode *)malloc(sizeof(Stacknode));
s->next=NULL;
}
ElemType StackEmpty(LinkStack s)
{
return(s==NULL);
}
void Push(LinkStack &s,ElemType e)
{
LinkStack p;
p=(Stacknode *)malloc(sizeof(Stacknode));
p->data=e;
p->next=s;
s=p;
}