void Pop(LinkStack *Stack)
{
if (Stack->top == null)
{
printf("the stack is empty\n");
return;
}
SNode *node = Stack->top;
Stack->top = node->next;
free(node);
}
void Push(LinkStack *Stack ,SElemType data)
{
SNode *node = (struct Snode*)malloc(sizeof(Snode));
if (node == NULL)
{
printf("fatal error");
reutrn ;
}
node->data = data;
node->next = Stack->top;
Stack->top = node;
}