Compile Error

/in/foo.cc:6:21: error: 'n' was not declared in this scope
    6 | bool bh(int a,int b[n])
      |                     ^
/in/foo.cc: In function 'bool bh(...)':
/in/foo.cc:8:23: error: 'n' was not declared in this scope
    8 |         for(int i=0;i<n;i++)
      |                       ^
/in/foo.cc:9:20: error: 'a' was not declared in this scope
    9 |                 if(a==b[i]) return 0;return 1;}
      |                    ^
/in/foo.cc:9:23: error: 'b' was not declared in this scope
    9 |                 if(a==b[i]) return 0;return 1;}
      |                       ^
/in/foo.cc:9:17: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
    9 |                 if(a==b[i]) return 0;return 1;}
      |                 ^~
/in/foo.cc:9:38: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
    9 |                 if(a==b[i]) return 0;return 1;}
      |                                      ^~~~~~
/in/foo.cc:8:9: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
    8 |         for(int i=0;i<n;i++)
      |         ^~~
/in/foo.cc:9:38: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
    9 |                 if(a==b[i]) return 0;return 1;}
      |                                      ^~~~~~

信息

递交者
类型
递交
题目
P1147 OO11-1 vector<int>中的查找删除
语言
C++
递交时间
2025-10-09 23:25:34
评测时间
2025-10-09 23:25:34
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes