foo.cc:6:4: error: expected initializer before 'int'
int const N=100;
^~~
foo.cc:7:11: error: 'N' was not declared in this scope
char a[N],b[N];
^
foo.cc:7:16: error: 'N' was not declared in this scope
char a[N],b[N];
^
foo.cc:9:8: error: expected constructor, destructor, or type conversion before '(' token
gets(a);
^
foo.cc:10:4: error: 'n' does not name a type
n=strlen(a);
^
foo.cc:11:4: error: expected unqualified-id before 'for'
for(i=0;i<n;i++)
^~~
foo.cc:11:12: error: 'i' does not name a type
for(i=0;i<n;i++)
^
foo.cc:11:16: error: 'i' does not name a type
for(i=0;i<n;i++)
^
foo.cc:19:4: error: 'b' does not name a type
b[k]='\0';
^
foo.cc:20:4: error: 'cout' does not name a type
cout<<b;
^~~~
foo.cc:22:4: error: expected unqualified-id before 'return'
return 0;
^~~~~~
foo.cc:23:1: error: expected declaration before '}' token
}
^
[Hydro](https://hydro.ac)提供评测服务