advisor.cpp: In function 'void ComputeAdvice(int*, int, int, int)':
advisor.cpp:56:3: error: reference to 'next' is ambiguous
next[i] = position[d[i]];
^~~~
advisor.cpp:34:5: note: candidates are: int next [100000]
int next[MAXN]; // next[i] = index of next occurrence of d[i] in array d (n if it is the last occurrence)
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/deque:60,
from /usr/include/c++/7/queue:60,
from advisor.cpp:8:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
advisor.cpp:72:20: error: expected primary-expression before '(' token
coda.push( Color( color, next[i] ) );
^
advisor.cpp:72:29: error: reference to 'next' is ambiguous
coda.push( Color( color, next[i] ) );
^~~~
advisor.cpp:34:5: note: candidates are: int next [100000]
int next[MAXN]; // next[i] = index of next occurrence of d[i] in array d (n if it is the last occurrence)
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/deque:60,
from /usr/include/c++/7/queue:60,
from advisor.cpp:8:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
advisor.cpp:87:19: error: expected primary-expression before '(' token
coda.push( Color( color, next[i] ) );
^
advisor.cpp:87:28: error: reference to 'next' is ambiguous
coda.push( Color( color, next[i] ) );
^~~~
advisor.cpp:34:5: note: candidates are: int next [100000]
int next[MAXN]; // next[i] = index of next occurrence of d[i] in array d (n if it is the last occurrence)
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/deque:60,
from /usr/include/c++/7/queue:60,
from advisor.cpp:8:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~