/in/foo.c:2:16: warning: 'struct aa' declared inside parameter list will not be visible outside of this definition or declaration
int com(struct aa *t,int n);
^~
/in/foo.c: In function 'main':
/in/foo.c:12:1: error: unknown type name 'aa'
aa *t;
^~
/in/foo.c:12:1: note: use 'struct' keyword to refer to the type
/in/foo.c:13:3: error: 'new' undeclared (first use in this function)
t=new aa[n];
^~~
/in/foo.c:13:3: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:13:7: error: expected ';' before 'aa'
t=new aa[n];
^~
/in/foo.c:16:6: error: request for member 'b' in something not a structure or union
t[i].b=i;
^
/in/foo.c:17:18: error: request for member 'a' in something not a structure or union
scanf("%d",&t[i].a);
^
/in/foo.c:21:8: warning: passing argument 1 of 'com' from incompatible pointer type [-Wincompatible-pointer-types]
{n=com(t,n);
^
/in/foo.c:2:5: note: expected 'struct aa *' but argument is of type 'int *'
int com(struct aa *t,int n);
^~~
/in/foo.c:24:20: error: request for member 'b' in something not a structure or union
printf("%d %d",t[1].b,t[2].b);
^
/in/foo.c:24:27: error: request for member 'b' in something not a structure or union
printf("%d %d",t[1].b,t[2].b);
^
/in/foo.c:25:1: error: 'delete' undeclared (first use in this function)
delete []t;
^~~~~~
/in/foo.c:25:9: error: expected expression before ']' token
delete []t;
^
/in/foo.c:10:7: warning: unused variable 's' [-Wunused-variable]
int n,s;
^
/in/foo.c: At top level:
/in/foo.c:28:5: error: conflicting types for 'com'
int com(struct aa *t,int n)
^~~
/in/foo.c:2:5: note: previous declaration of 'com' was here
int com(struct aa *t,int n);
^~~