/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void init()':
foo.cpp:20:3: error: reference to 'next' is ambiguous
   next[i]=t;
   ^
foo.cpp:8:5: note: candidates are: int next [200005]
 int next[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:4:
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 work(int)':
foo.cpp:48:9: error: reference to 'next' is ambiguous
   int p=next[hx];
         ^
foo.cpp:8:5: note: candidates are: int next [200005]
 int next[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:4:
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:56:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

信息

递交者
类型
递交
题目
P1979 信息传递
语言
C++
递交时间
2015-11-12 17:47:50
评测时间
2015-11-12 17:47:57
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes