为什么我的代码在vc++6.0一直说'top' is not a member of 'node'
typedef struct node{
char info;
struct node *link;
} STACK;
STACK *top;
push(arg)
char arg; {
STACK *ptr;
ptr=(STACK *)malloc(sizeof(STACK));
ptr->info=arg;
ptr->link=top;
top=ptr; }
char pop()
{ STACK *ptr;
char arg;
if(top=='\0')
return('\0');
else{
ptr=top;
top=top->link;
arg=ptr->info;
free(ptr);
return(arg); } }
main()
{STACK *s1;
int n,dt;
s1.top=0;
printf("Input a decimal number:");
scanf("%d",&n);
while( n != 0){
push(&s1,n%8);
n=n/8; }
printf("The octal number is:");
while((dt=pop(&s1))!= -1)
printf("%d",dt);
printf("\n"); }