/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void fill_color(int)':
foo.cpp:36:25: error: reference to 'next' is ambiguous
   for(int i=st[now];i;i=next[i])
                         ^
foo.cpp:10:19: note: candidates are: int next [620000]
 int st[N],en[N*2],next[N*2],cost[N*2],fa[N][20],d[N],height[N],s[N],dis[N],t[N],bh[N],l[N],r[N],p[N];
                   ^
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++\algorithm:61,
                 from foo.cpp:3:
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 insert(int, int, int)':
foo.cpp:43:2: error: reference to 'next' is ambiguous
  next[++ed]=st[x];
  ^
foo.cpp:10:19: note: candidates are: int next [620000]
 int st[N],en[N*2],next[N*2],cost[N*2],fa[N][20],d[N],height[N],s[N],dis[N],t[N],bh[N],l[N],r[N],p[N];
                   ^
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++\algorithm:61,
                 from foo.cpp:3:
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 'int main()':
foo.cpp:66:25: error: reference to 'next' is ambiguous
   for(int j=st[now];j;j=next[j])
                         ^
foo.cpp:10:19: note: candidates are: int next [620000]
 int st[N],en[N*2],next[N*2],cost[N*2],fa[N][20],d[N],height[N],s[N],dis[N],t[N],bh[N],l[N],r[N],p[N];
                   ^
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++\algorithm:61,
                 from foo.cpp:3:
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:120:25: error: reference to 'next' is ambiguous
   for(int j=st[now];j;j=next[j])
                         ^
foo.cpp:10:19: note: candidates are: int next [620000]
 int st[N],en[N*2],next[N*2],cost[N*2],fa[N][20],d[N],height[N],s[N],dis[N],t[N],bh[N],l[N],r[N],p[N];
                   ^
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++\algorithm:61,
                 from foo.cpp:3:
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-15 01:00:19
评测时间
2015-11-15 01:00:20
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes