/in/foo.c:10:9: error: expected ':', ',', ';', '}' or '__attribute__' before '=' token
int all=0;
^
/in/foo.c: In function 'main':
/in/foo.c:17:6: error: 'student {aka struct stu}' has no member named 'all'
flag.all=0;
^
/in/foo.c:20:57: error: expected expression before 'student'
scanf("%s %d %d %c %c %d",&stu.name,&stu.avg,&stu.vi,&student.ganbu,&stu.xibu,&stu.lenwen);
^~~~~~~
/in/foo.c:22:10: error: 'student {aka struct stu}' has no member named 'lenwen'; did you mean 'lunwen'?
if(stu.lenwen>=1)
^
/in/foo.c:23:8: error: 'student {aka struct stu}' has no member named 'all'
stu.all+=8000;
^
/in/foo.c:25:8: error: 'student {aka struct stu}' has no member named 'all'
stu.all+=850;
^
/in/foo.c:28:7: error: 'vi' undeclared (first use in this function)
if(vi>80)
^~
/in/foo.c:28:7: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:29:8: error: 'student {aka struct stu}' has no member named 'all'
stu.all+=4000;
^
/in/foo.c:31:8: error: 'student {aka struct stu}' has no member named 'all'
stu.all+=1000;
^
/in/foo.c:34:7: error: 'student {aka struct stu}' has no member named 'all'
stu.all+=2000;
^
/in/foo.c:36:11: error: 'student {aka struct stu}' has no member named 'all'
sum+=stu.all;
^
/in/foo.c:37:9: error: 'student {aka struct stu}' has no member named 'all'
if(stu.all>flag.all){
^
/in/foo.c:37:18: error: 'student {aka struct stu}' has no member named 'all'
if(stu.all>flag.all){
^
/in/foo.c:41:34: error: 'student {aka struct stu}' has no member named 'all'
printf("%s\n%d\n%d",stu.name,stu.all,sum);
^
/in/foo.c:16:14: warning: variable 'flag' set but not used [-Wunused-but-set-variable]
student stu,flag;
^~~~