/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void add(int, int, int)':
foo.cpp:19:37: error: reference to 'next' is ambiguous
  e++; a[e].u=u; a[e].v=v; a[e].w=w; next[e]=point[u]; point[u]=e;
                                     ^
foo.cpp:15:19: note: candidates are: int next [600001]
 int point[300001],next[600001];
                   ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
                 from foo.cpp:1:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\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:20:37: error: reference to 'next' is ambiguous
  e++; a[e].u=v; a[e].v=u; a[e].w=w; next[e]=point[v]; point[v]=e;
                                     ^
foo.cpp:15:19: note: candidates are: int next [600001]
 int point[300001],next[600001];
                   ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
                 from foo.cpp:1:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\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)':
foo.cpp:32:24: error: reference to 'next' is ambiguous
  for (i=point[now];i;i=next[i])
                        ^
foo.cpp:15:19: note: candidates are: int next [600001]
 int point[300001],next[600001];
                   ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
                 from foo.cpp:1:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\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-16 14:14:26
评测时间
2015-11-16 14:14:27
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes