Compile Error

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)提供评测服务

信息

递交者
类型
递交
题目
P1079 删除指定字符
语言
C++
递交时间
2021-08-07 11:37:53
评测时间
2021-08-07 11:37:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes