Borderou de evaluare (job #2181216)

Utilizator LittleWhoFeraru Mihail LittleWho Data 21 martie 2018 15:29:52
Problema Galeti2 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:19:5: error: reference to ‘stack’ is ambiguous stack[0] = 1; ^ user.cpp:6:5: note: candidates are: int stack [100000] int stack[nmax]; ^ In file included from /usr/include/c++/5/stack:61:0, from /usr/include/x86_64-linux-gnu/c++/5/32/bits/stdc++.h:88, from user.cpp:1: /usr/include/c++/5/bits/stl_stack.h:99:11: note: template<class _Tp, class _Sequence> class std::stack class stack ^ user.cpp:22:21: error: reference to ‘stack’ is ambiguous cout << stack[v] << " " << stack[v - 1] << "\n"; ^ user.cpp:6:5: note: candidates are: int stack [100000] int stack[nmax]; ^ In file included from /usr/include/c++/5/stack:61:0, from /usr/include/x86_64-linux-gnu/c++/5/32/bits/stdc++.h:88, from user.cpp:1: /usr/include/c++/5/bits/stl_stack.h:99:11: note: template<class _Tp, class _Sequence> class std::stack class stack ^ user.cpp:22:40: error: reference to ‘stack’ is ambiguous cout << stack[v] << " " << stack[v - 1] << "\n"; ^ user.cpp:6:5: note: candidates are: int stack [100000] int stack[nmax]; ^ In file included from /usr/include/c++/5/stack:61:0, from /usr/include/x86_64-linux-gnu/c++/5/32/bits/stdc++.h:88, from user.cpp:1: /usr/include/c++/5/bits/stl_stack.h:99:11: note: template<class _Tp, class _Sequence> class std::stack class stack ^ user.cpp:25:9: error: reference to ‘stack’ is ambiguous stack[++v] = i; ^ user.cpp:6:5: note: candidates are: int stack [100000] int stack[nmax]; ^ In file included from /usr/include/c++/5/stack:61:0, from /usr/include/x86_64-linux-gnu/c++/5/32/bits/stdc++.h:88, from user.cpp:1: /usr/include/c++/5/bits/stl_stack.h:99:11: note: template<class _Tp, class _Sequence> class std::stack class stack ^ user.cpp:30:17: error: reference to ‘stack’ is ambiguous

Ceva nu functioneaza?