foo.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <iostream>
| ^
foo.c: In function 'main':
foo.c:4:5: error: unknown type name 'string'
4 | string a;
| ^~~~~~
foo.c:5:5: error: 'cin' undeclared (first use in this function)
5 | cin>>a;
| ^~~
foo.c:5:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c:7:9: error: 'cout' undeclared (first use in this function)
7 | cout<<a[i];
| ^~~~
foo.c:7:16: error: subscripted value is neither array nor pointer nor vector
7 | cout<<a[i];
| ^
[Hydro](https://hydro.ac)提供评测服务