Borderou de evaluare (job #2267661)

Utilizator dragos192k1Dragos-Iulian Galeteanu dragos192k1 Data 23 octombrie 2018 20:32:22
Problema Camionas Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:27:12: warning: left operand of comma operator has no effect [-Wunused-value] x, y, w; ^ main.cpp:27:15: warning: right operand of comma operator has no effect [-Wunused-value] x, y, w; ^ main.cpp:27:16: warning: right operand of comma operator has no effect [-Wunused-value] x, y, w; ^ main.cpp:40:21: warning: array subscript has type 'char' [-Wchar-subscripts] c[x][c[x][0]] = w < g; ^ main.cpp:44:21: warning: array subscript has type 'char' [-Wchar-subscripts] c[y][c[y][0]] = w < g; ^ main.cpp:56:13: error: reference to 'next' is ambiguous next = a[first][i]; ^~~~ main.cpp:8:33: note: candidates are: int next int n, m, g, i, x, y, w, first, next, *a[50005], cost[50005]; ^~~~ In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0, from /usr/include/c++/6/deque:60, from /usr/include/c++/6/queue:60, from main.cpp:3: /usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type) next(_ForwardIterator __x, typename ^~~~ main.cpp:58:22: error: reference to 'next' is ambiguous if (cost[next] > cost[first] + c[first][i]) { ^~~~ main.cpp:8:33: note: candidates are: int next int n, m, g, i, x, y, w, first, next, *a[50005], cost[50005]; ^~~~ In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0, from /usr/include/c++/6/deque:60, from /usr/include/c++/6/queue:60, from main.cpp:3: /usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type) next(_ForwardIterator __x, typename ^~~~ main.cpp:59:22: error: reference to 'next' is ambiguous cost[next] = cost[first] + c[first][i]; ^~~~ main.cpp:8:33: note: candidates are: int next int n, m, g, i, x, y, w, first, next, *a[50005], cost[50005]; ^~~~ In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0, from /usr/include/c++/6/deque:60, Non zero exit status: 1

Ceva nu functioneaza?