foo.c:8:16: error: expected ':', ',', ';', '}' or '__attribute__' before '=' token
8 | int top=-1;
| ^
foo.c:11:19: error: expected ';', ',' or ')' before '&' token
11 | void push(int x,s &p)
| ^
foo.c:16:12: error: expected ';', ',' or ')' before '&' token
16 | void pop(s &p)
| ^
foo.c: In function 'main':
foo.c:35:25: warning: implicit declaration of function 'push' [-Wimplicit-function-declaration]
35 | push(j,s1);
| ^~~~
foo.c:38:45: error: 's' {aka 'struct SqStack'} has no member named 'top'
38 | for(int k=s1.data[s1.top]+1;k<j;k++)
| ^
foo.c:59:49: error: 's' {aka 'struct SqStack'} has no member named 'top'
59 | for(int k=0;k<s0.top;k++)
| ^
foo.c:73:117: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
73 | s2[s0.data[k+1]]=(s2[s0.data[k]]-'0')|(s2[s0.data[k+1]]-'0')+'0';
| ~~~~~~~~~~~~~~~~~~~~~~^~~~
foo.c:80:46: error: 's' {aka 'struct SqStack'} has no member named 'top'
80 | s2[s1.data[s1.top]]='\0';s2[j]='\0';
| ^
foo.c:81:33: warning: implicit declaration of function 'pop' [-Wimplicit-function-declaration]
81 | pop(s1);
| ^~~
foo.c:82:41: error: 's' {aka 'struct SqStack'} has no member named 'top'
82 | while(s0.top!=-1) pop(s0);
| ^
foo.c:106:33: error: 's' {aka 'struct SqStack'} has no member named 'top'
106 | for(int k=0;k<s0.top;k++)
| ^
foo.c:120:101: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
120 | s2[s0.data[k+1]]=(s2[s0.data[k]]-'0')|(s2[s0.data[k+1]]-'0')+'0';
| ~~~~~~~~~~~~~~~~~~~~~~^~~~
[Hydro](https://hydro.ac)提供评测服务