Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:14:4: error: reference to 'array' is ambiguous
    array[++cnt]=it%2;
    ^~~~~
/in/foo.cc:3:7: note: candidates are: int array [105]
 int n,array[105],a,b,aa,bb;
       ^~~~~
In file included from /usr/include/c++/6/tuple:39:0,
                 from /usr/include/c++/6/functional:55,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:71,
                 from /in/foo.cc:1:
/usr/include/c++/6/array:90:12: note:                 template<class _Tp, long unsigned int _Nm> struct std::array
     struct array
            ^~~~~
/in/foo.cc:19:7: error: reference to 'array' is ambiguous
    if(array[i])a++;
       ^~~~~
/in/foo.cc:3:7: note: candidates are: int array [105]
 int n,array[105],a,b,aa,bb;
       ^~~~~
In file included from /usr/include/c++/6/tuple:39:0,
                 from /usr/include/c++/6/functional:55,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:71,
                 from /in/foo.cc:1:
/usr/include/c++/6/array:90:12: note:                 template<class _Tp, long unsigned int _Nm> struct std::array
     struct array
            ^~~~~

信息

递交者
类型
递交
题目
P1731 A类B类
语言
C++
递交时间
2024-08-03 10:24:49
评测时间
2024-08-03 10:24:49
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes