这样写堆栈错在哪?
#include <iostream>
using namespace std;
typedef struct ArrayStack{
int List[50];
int top;
}*Stack;
void InitStack(Stack& s)
{
s->top=-1;
}
void push(Stack& s,int e)
{
if(s->top==49)
cout<<"FULL"<<endl;
else
{
s->List[++s->top]=e;
}
}
int main()
{
Stack s;
InitStack(s);
push(s,5);
return 0;
}