/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'int main()':
foo.cpp:72:12: warning: unused variable 'p' [-Wunused-variable]
        int p;
            ^
foo.cpp:81:12: warning: unused variable 'p' [-Wunused-variable]
        int p;
            ^
foo.cpp:91:2: error: reference to 'hash' is ambiguous
  hash[(1<<n)-1]=1;
  ^~~~
foo.cpp:60:5: note: candidates are: int hash [1060000]
 int hash[1060000];
     ^~~~
In file included from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/stl_bvector.h:1262:0,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/vector:65,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/queue:61,
                 from foo.cpp:2:
C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cpp:92:4: error: reference to 'hash' is ambiguous
  S=hash[(1<<n)-1];
    ^~~~
foo.cpp:60:5: note: candidates are: int hash [1060000]
 int hash[1060000];
     ^~~~
In file included from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/stl_bvector.h:1262:0,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/vector:65,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/queue:61,
                 from foo.cpp:2:
C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cpp:105:15: error: reference to 'hash' is ambiguous
           if(!hash[zt])
               ^~~~
foo.cpp:60:5: note: candidates are: int hash [1060000]
 int hash[1060000];
     ^~~~
In file included from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/stl_bvector.h:1262:0,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/vector:65,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/queue:61,
                 from foo.cpp:2:
C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cpp:108:13: error: reference to 'hash' is ambiguous
             hash[zt]=cnt;
             ^~~~
foo.cpp:60:5: note: candidates are: int hash [1060000]
 int hash[1060000];
     ^~~~
In file included from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/stl_bvector.h:1262:0,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/vector:65,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/queue:61,
                 from foo.cpp:2:
C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cpp:110:17: error: reference to 'hash' is ambiguous
           Add(j,hash[zt],t[i]);
                 ^~~~
foo.cpp:60:5: note: candidates are: int hash [1060000]
 int hash[1060000];
     ^~~~
In file included from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/stl_bvector.h:1262:0,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/vector:65,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/queue:61,
                 from foo.cpp:2:
C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
foo.cpp:112:15: error: reference to 'hash' is ambiguous
             T=hash[zt];
               ^~~~
foo.cpp:60:5: note: candidates are: int hash [1060000]
 int hash[1060000];
     ^~~~
In file included from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/stl_bvector.h:1262:0,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/vector:65,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/queue:

信息

递交者
类型
递交
题目
P1019 补丁VS错误
语言
C++
递交时间
2017-02-22 17:32:39
评测时间
2017-02-22 17:32:39
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes