foo.c: In function 'main':
foo.c:18:14: error: 'new' undeclared (first use in this function)
18 | int *a = new int[na];
| ^~~
foo.c:18:14: note: each undeclared identifier is reported only once for each function it appears in
foo.c:18:18: error: expected ',' or ';' before 'int'
18 | int *a = new int[na];
| ^~~
foo.c:19:22: error: expected ',' or ';' before 'int'
19 | int *b = new int[nb];
| ^~~
foo.c:20:22: error: expected ',' or ';' before 'int'
20 | int *c = new int[nc];
| ^~~
foo.c:21:22: error: expected ',' or ';' before 'int'
21 | int *d = new int[na + nb];
| ^~~
foo.c:22:22: error: expected ',' or ';' before 'int'
22 | int *e = new int[na + nc];
| ^~~
foo.c:24:20: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
24 | scanf("%d\n",a[i]);
| ~^ ~~~~
| | |
| int * int
foo.c:26:20: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
26 | scanf("%d\n",b[j]);
| ~^ ~~~~
| | |
| int * int
foo.c:28:20: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
28 | scanf("%d",c[k]);
| ~^ ~~~~
| | |
| | int
| int *
[Hydro](https://hydro.ac)提供评测服务