foo.c:4:21: error: expected ']' before ';' token
#define MaxSize 1000;
^
foo.c:8:11: note: in expansion of macro 'MaxSize'
int data[MaxSize];
^
foo.c:9:1: warning: no semicolon at end of struct or union
}Stack;
^
foo.c: In function 'main':
foo.c:4:21: error: expected ']' before ';' token
#define MaxSize 1000;
^
foo.c:17:20: note: in expansion of macro 'MaxSize'
char sentences[MaxSize];
^
foo.c:18:13: error: 'sentences' undeclared (first use in this function)
scanf("%s",sentences);
^
foo.c:18:13: note: each undeclared identifier is reported only once for each function it appears in
foo.c:20:16: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
for(int i=0;i<strlen(sentences);i++)
^
foo.c:20:16: warning: incompatible implicit declaration of built-in function 'strlen'
foo.c:20:16: note: include '<string.h>' or provide a declaration of 'strlen'
foo.c:25:5: error: 'Stack {aka struct <anonymous>}' has no member named 'data'
p->data[i]=i;
^
foo.c:29:7: error: 't' undeclared (first use in this function)
if(t->top==-1)//栈内没有左括号,right情况
^
foo.c:43:18: error: 'Stack {aka struct <anonymous>}' has no member named 'data'
printf(" %d",p->data[p->top--];
^
foo.c:43:34: error: expected ')' before ';' token
printf(" %d",p->data[p->top--];
^
foo.c:44:3: error: expected ';' before '}' token
}
^
foo.c:48:1: error: expected declaration or statement at end of input
}
^
自豪的采用 HydroJudger 进行评测(github.com/hydro-dev/HydroJudger)