/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void Add(int, int, int)':
foo.cpp:21:2: error: reference to 'next' is ambiguous
  next[len]=first[from];
  ^
foo.cpp:12:5: note: candidates are: int next [200010]
 int next[MAXM];
     ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/char_traits.h:39,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ios:40,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ostream:38,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:39,
                 from foo.cpp:1:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
foo.cpp: In function 'void DFS(int, int, int, int)':
foo.cpp:37:5: error: reference to 'next' is ambiguous
   k=next[k];
     ^
foo.cpp:12:5: note: candidates are: int next [200010]
 int next[MAXM];
     ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/char_traits.h:39,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ios:40,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ostream:38,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:39,
                 from foo.cpp:1:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^

信息

递交者
类型
递交
题目
P1983 运输计划
语言
C++
递交时间
2015-11-11 16:17:40
评测时间
2015-11-11 16:17:41
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes