/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'bool pd(double)':
foo.cpp:77:9: error: reference to 'next' is ambiguous
  memset(next,0,sizeof(next));
         ^~~~
foo.cpp:13:15: note: candidates are: int dinic::next [12036]
  int first[N],next[N<<2],la;
               ^~~~
In file included from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/stl_algobase.h:66:0,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/char_traits.h:39,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/ios:40,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/ostream:38,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/iostream:39,
                 from foo.cpp:1:
C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/stl_iterator_base_funcs.h:205:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
foo.cpp:77:23: error: reference to 'next' is ambiguous
  memset(next,0,sizeof(next));
                       ^~~~
foo.cpp:13:15: note: candidates are: int dinic::next [12036]
  int first[N],next[N<<2],la;
               ^~~~
In file included from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/stl_algobase.h:66:0,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/char_traits.h:39,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/ios:40,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/ostream:38,
                 from C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/iostream:39,
                 from foo.cpp:1:
C:/mingw32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/stl_iterator_base_funcs.h:205:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^~~~
foo.cpp: In function 'int main()':
foo.cpp:98:10: warning: unused variable 'k' [-Wunused-variable]
  int i,j,k;
          ^

信息

递交者
类型
递交
题目
P1948 星际战争
语言
C++
递交时间
2017-03-05 21:22:24
评测时间
2017-03-05 21:22:24
评测机
分数
0
总耗时
242ms
峰值内存
0 Bytes