/in/foo.cc: In function 'int main()':
/in/foo.cc:15:9: error: reference to 'stack' is ambiguous
stack[++top]=cur++;
^~~~~
/in/foo.cc:4:5: note: candidates are: int stack [1010]
int stack[N],a[N];
^~~~~
In file included from /usr/include/c++/6/stack:61:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:89,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_stack.h:99:11: note: template<class _Tp, class _Sequence> class std::stack
class stack
^~~~~
/in/foo.cc:16:7: error: reference to 'stack' is ambiguous
if(stack[top]==a[i])
^~~~~
/in/foo.cc:4:5: note: candidates are: int stack [1010]
int stack[N],a[N];
^~~~~
In file included from /usr/include/c++/6/stack:61:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:89,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_stack.h:99:11: note: template<class _Tp, class _Sequence> class std::stack
class stack
^~~~~