Borderou de evaluare (job #1236928)
Utilizator | Data | 2 octombrie 2014 20:03:19 | |
---|---|---|---|
Problema | Algoritmul lui Dijkstra | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:18:83: error: wrong number of template arguments (2, should be 1)
priority_queue < pair < int , int > , vector < int , int > , greater < int , int > > Heap[NMAX];
^
In file included from /usr/include/c++/4.8/string:48:0,
from /usr/include/c++/4.8/bits/locale_classes.h:40,
from /usr/include/c++/4.8/bits/ios_base.h:41,
from /usr/include/c++/4.8/ios:42,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_function.h:222:12: error: provided for ‘template<class _Tp> struct std::greater’
struct greater : public binary_function<_Tp, _Tp, bool>
^
user.cpp:18:85: error: template argument 3 is invalid
priority_queue < pair < int , int > , vector < int , int > , greater < int , int > > Heap[NMAX];
^
user.cpp:18:97: error: invalid type in declaration before ‘;’ token
priority_queue < pair < int , int > , vector < int , int > , greater < int , int > > Heap[NMAX];
^
user.cpp: In function ‘int main()’:
user.cpp:32:9: error: request for member ‘push’ in ‘Heap’, which is of non-class type ‘int [50005]’
Heap.push( make_pair ( 0 , 1 ));
^
user.cpp:33:18: error: request for member ‘empty’ in ‘Heap’, which is of non-class type ‘int [50005]’
for ( ; !Heap.empty(); )
^
user.cpp:36:19: error: request for member ‘top’ in ‘Heap’, which is of non-class type ‘int [50005]’
node = Heap.top().second();
^
user.cpp:37:19: error: request for member ‘top’ in ‘Heap’, which is of non-class type ‘int [50005]’
cost = Heap.top().first;
^
user.cpp:43:14: error: request for member ‘push’ in ‘Heap’, which is of non-class type ‘int [50005]’
Heap.push( make_pair ( Distance [it->first] , it->first ));
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !