Borderou de evaluare (job #1758838)
Utilizator | Data | 17 septembrie 2016 22:56:14 | |
---|---|---|---|
Problema | Algoritmul lui Dijkstra | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘void dijkstra(int)’:
user.cpp:30:37: error: no matching function for call to ‘make_pair(int, int&)’
st.insert(make_pair<int,int>(0, nod));
^
user.cpp:30:37: note: candidate is:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:276:5: note: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
make_pair(_T1&& __x, _T2&& __y)
^
/usr/include/c++/4.8/bits/stl_pair.h:276:5: note: template argument deduction/substitution failed:
user.cpp:30:37: note: cannot convert ‘nod’ (type ‘int’) to type ‘int&&’
st.insert(make_pair<int,int>(0, nod));
^
user.cpp:36:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < v[nod].size (); i++) {
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !