Borderou de evaluare (job #2796724)
Utilizator | Data | 8 noiembrie 2021 18:54:26 | |
---|---|---|---|
Problema | BFS - Parcurgere in latime | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void bfs(int)':
main.cpp:27:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
27 | for (int i = 0; i < v[snod].size(); i++){
| ~~^~~~~~~~~~~~~~~~
main.cpp:28:7: error: reference to 'next' is ambiguous
28 | next = v[snod][i];
| ^~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:66,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/fstream:38,
from main.cpp:1:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
213 | next(_InputIterator __x, typename
| ^~~~
main.cpp:15:5: note: 'int next'
15 | int next;
| ^~~~
main.cpp:29:16: error: reference to 'next' is ambiguous
29 | if (dist[next] == 0){
| ^~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:66,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/fstream:38,
from main.cpp:1:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
213 | next(_InputIterator __x, typename
| ^~~~
main.cpp:15:5: note: 'int next'
15 | int next;
| ^~~~
main.cpp:30:14: error: reference to 'next' is ambiguous
30 | dist[next] = d + 1;
| ^~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:66,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/fstream:38,
from main.cpp:1:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
213 | next(_InputIterator __x, typename
| ^~~~
main.cpp:15:5: note: 'int next'
15 | int next;
| ^~~~
main.cpp:31:16: error: reference to 'next' is ambiguous
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !