#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define STACK_INIT_SIZE 100
#define STACKINCREMENT 10
typedef struct Sq{
char *base;
char *top;
int stacksize;
}SqStack;
void InitStack(SqStack *s)
{
s->base =(char *)malloc(STACK_INIT_SIZE*sizeof(char));
if(!s->base )
exit(0);
s->top =s->base ;
s->stacksize =STACK_INIT_SIZE;
}
void Push(SqStack *s,char e)
{
if(s->top -s->base ==s->stacksize )
#include <stdlib.h>
#include <string.h>
#define STACK_INIT_SIZE 100
#define STACKINCREMENT 10
typedef struct Sq{
char *base;
char *top;
int stacksize;
}SqStack;
void InitStack(SqStack *s)
{
s->base =(char *)malloc(STACK_INIT_SIZE*sizeof(char));
if(!s->base )
exit(0);
s->top =s->base ;
s->stacksize =STACK_INIT_SIZE;
}
void Push(SqStack *s,char e)
{
if(s->top -s->base ==s->stacksize )