/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void getnext()':
/in/foo.cc:33:2: error: reference to 'next' is ambiguous
  next[1]=0;
  ^~~~
/in/foo.cc:30:5: note: candidates are: int next [250]
 int next[250];
     ^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/6/algorithm:61,
                 from /in/foo.cc:4:
/usr/include/c++/6/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
     ^~~~
/in/foo.cc:36:28: error: reference to 'next' is ambiguous
   while(j&&s[j+1]!=s[i]) j=next[j];
                            ^~~~
/in/foo.cc:30:5: note: candidates are: int next [250]
 int next[250];
     ^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/6/algorithm:61,
                 from /in/foo.cc:4:
/usr/include/c++/6/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
     ^~~~
/in/foo.cc:38:3: error: reference to 'next' is ambiguous
   next[i]=j;
   ^~~~
/in/foo.cc:30:5: note: candidates are: int next [250]
 int next[250];
     ^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/6/algorithm:61,
                 from /in/foo.cc:4:
/usr/include/c++/6/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
     ^~~~
/in/foo.cc: In function 'void kmp()':
/in/foo.cc:45:28: error: reference to 'next' is ambiguous
   while(j&&s[j+1]!=t[i]) j=next[j];
                            ^~~~
/in/foo.cc:30:5: note: candidates are: int next [250]
 int next[250];
     ^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/6/algorithm:61,
                 from /in/foo.cc:4:
/usr/include/c++/6/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
     ^~~~

信息

递交者
类型
递交
题目
P1005 超长数字串
语言
C++
递交时间
2018-09-30 21:14:50
评测时间
2018-09-30 21:14:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes