Borderou de evaluare (job #773273)

Utilizator avatar Rradu_v2 Catana Radu Rradu_v2 IP ascuns
Problemă Onigim (clasa a 5-a) Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 10 apr. 2024 09:19:05 Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:31:19: error: reference to 'next' is ambiguous 31 | while(next[j]!=0) | ^~~~ In file included from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_algobase.h:66, from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/algorithm:60, from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/i686-pc-linux-gnu/bits/stdc++.h:51, from main.cpp:1: /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ main.cpp:8:5: note: 'int next [1000]' 8 | int next[1000]; | ^~~~ main.cpp:32:21: error: reference to 'next' is ambiguous 32 | j = next[j]-1; | ^~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ main.cpp:8:5: note: 'int next [1000]' 8 | int next[1000]; | ^~~~ main.cpp:33:13: error: reference to 'next' is ambiguous 33 | next[j] = i+1; | ^~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ main.cpp:8:5: note: 'int next [1000]' 8 | int next[1000]; | ^~~~ main.cpp:54:19: error: reference to 'next' is ambiguous 54 | while(next[j]!=0) | ^~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ main.cpp:8:5: note: 'int next [1000]' 8 | int next[1000]; | ^~~~ main.cpp:56:21: error: reference to 'next' is ambiguous 56 | j = next[j]-1; | ^~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ main.cpp:8:5: note: 'int next [1000]' 8 | int next[1000]; | ^~~~