Borderou de evaluare (job #1975471)
Utilizator | Data | 1 mai 2017 00:38:43 | |
---|---|---|---|
Problema | Algoritmul lui Dijkstra | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int main()’:
user.cpp:36:21: error: no match for ‘operator[]’ (operand types are ‘int [50003]’ and ‘std::pair<int, int>’)
if(!c[i])
^
user.cpp:37:22: error: no match for ‘operator[]’ (operand types are ‘int [50003]’ and ‘std::pair<int, int>’)
c[i] = 1, q.push(i);
^
user.cpp:37:39: error: no matching function for call to ‘std::queue<int>::push(std::pair<int, int>&)’
c[i] = 1, q.push(i);
^
user.cpp:37:39: note: candidates are:
In file included from /usr/include/c++/4.8/queue:64:0,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_queue.h:212:7: note: void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; std::queue<_Tp, _Sequence>::value_type = int]
push(const value_type& __x)
^
/usr/include/c++/4.8/bits/stl_queue.h:212:7: note: no known conversion for argument 1 from ‘std::pair<int, int>’ to ‘const value_type& {aka const int&}’
/usr/include/c++/4.8/bits/stl_queue.h:217:7: note: void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; std::queue<_Tp, _Sequence>::value_type = int]
push(value_type&& __x)
^
/usr/include/c++/4.8/bits/stl_queue.h:217:7: note: no known conversion for argument 1 from ‘std::pair<int, int>’ to ‘std::queue<int>::value_type&& {aka int&&}’
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !