/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void update(Node, Node)':
foo.cpp:28:8: error: reference to 'next' is ambiguous
   if (!next[x.id][0]) {
        ^
foo.cpp:24:27: note: candidates are: int next [100005][2]
  int n, m, s, x, x0, ans, next[N][2], dist[N][2], g[N][LOG];
                           ^
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++\vector:60,
                 from foo.cpp:5:
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:29:4: error: reference to 'next' is ambiguous
    next[x.id][0]=y.id;
    ^
foo.cpp:24:27: note: candidates are: int next [100005][2]
  int n, m, s, x, x0, ans, next[N][2], dist[N][2], g[N][LOG];
                           ^
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++\vector:60,
                 from foo.cpp:5:
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:32:80: error: reference to 'next' is ambiguous
   else if (abs(x.h-y.h)<dist[x.id][0] || (abs(x.h-y.h)==dist[x.id][0] && y.h<c[next[x.id][0]].h)) {
                                                                                ^
foo.cpp:24:27: note: candidates are: int next [100005][2]
  int n, m, s, x, x0, ans, next[N][2], dist[N][2], g[N][LOG];
                           ^
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++\vector:60,
                 from foo.cpp:5:
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:33:4: error: reference to 'next' is ambiguous
    next[x.id][1]=next[x.id][0];
    ^
foo.cpp:24:27: note: candidates are: int next [100005][2]
  int n, m, s, x, x0, ans, next[N][2], dist[N][2], g[N][LOG];
                           ^
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++\vector:60,
                 from foo.cpp:5:
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:33:18: error: reference to 'next' is ambiguous
    next[x.id][1]=next[x.id][0];
                  ^
foo.cpp:24:27: note: candidates are: int next [100005][2]
  int n, m, s, x, x0, ans, next[N][2], dist[N][2], g[N][LOG];
                           ^
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++\vector:60,
                 from foo.cpp:5:
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:35:3: error: reference to 'next' is ambiguous
   next[x.id][0]=y.id;
   ^
foo.cpp:24:27: note: candidates are: int next [100

信息

递交者
类型
递交
题目
P1780 开车旅行
语言
C++
递交时间
2015-12-16 19:13:49
评测时间
2015-12-16 19:14:20
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes