/in/foo.c:5:2: error: expected identifier or '(' before 'float'
float min,
^~~~~
/in/foo.c:7:1: warning: no semicolon at end of struct or union
};
^
/in/foo.c:8:1: error: unknown type name 'ZX'
ZX wang(float a[],int n)
^~
/in/foo.c:8:1: note: use 'struct' keyword to refer to the type
/in/foo.c: In function 'wang':
/in/foo.c:12:4: error: 'struct ZX' has no member named 'min'
zx.min=a[0];
^
/in/foo.c:14:17: error: expected ';' before ':' token
for(int i=1;i<n:i++)
^
/in/foo.c:18:13: error: 'struct ZX' has no member named 'min'
if(a[i]<zx.min))
^
/in/foo.c:18:18: error: expected statement before ')' token
if(a[i]<zx.min))
^
/in/foo.c:19:6: error: 'struct ZX' has no member named 'min'
zx.min=a[i];
^
/in/foo.c:22:4: error: 'struct ZX' has no member named 'ag'
zx.ag=aum/n;
^
/in/foo.c:22:8: error: 'aum' undeclared (first use in this function)
zx.ag=aum/n;
^~~
/in/foo.c:22:8: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:23:9: error: incompatible types when returning type 'struct ZX' but 'int' was expected
return zx;
^~
/in/foo.c: In function 'main':
/in/foo.c:30:2: error: unknown type name 'ZX'
ZX zx=wang(a,10);
^~
/in/foo.c:30:2: note: use 'struct' keyword to refer to the type
/in/foo.c:31:28: error: request for member 'max' in something not a structure or union
printf("%.2f %.2f %.2f",zx.max,zx.min,zx.ag);
^
/in/foo.c:31:35: error: request for member 'min' in something not a structure or union
printf("%.2f %.2f %.2f",zx.max,zx.min,zx.ag);
^
/in/foo.c:31:42: error: request for member 'ag' in something not a structure or union
printf("%.2f %.2f %.2f",zx.max,zx.min,zx.ag);
^
/in/foo.c:30:5: warning: variable 'zx' set but not used [-Wunused-but-set-variable]
ZX zx=wang(a,10);
^~
/in/foo.c: In function 'wang':
/in/foo.c:24:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^