Borderou de evaluare (job #1245110)
Utilizator | Data | 18 octombrie 2014 17:18:22 | |
---|---|---|---|
Problema | Algoritmul lui Dijkstra | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:13:14: error: expected unqualified-id before ‘int’
struct item(int nod, int cost) : cost(cost), nod(nod) {}
^
user.cpp:13:14: error: expected ‘)’ before ‘int’
user.cpp:14:14: error: expected unqualified-id before ‘)’ token
struct item() {}
^
user.cpp:20:28: error: ‘INT_MAX’ was not declared in this scope
vector<int> distances(MAX, INT_MAX);
^
user.cpp: In function ‘void percolate(int)’:
user.cpp:66:27: error: no matching function for call to ‘item::item(int&, int&)’
H[index] = Item(nod, cost);
^
user.cpp:66:27: note: candidates are:
user.cpp:11:8: note: item::item()
struct item {
^
user.cpp:11:8: note: candidate expects 0 arguments, 2 provided
user.cpp:11:8: note: constexpr item::item(const item&)
user.cpp:11:8: note: candidate expects 1 argument, 2 provided
user.cpp:11:8: note: constexpr item::item(item&&)
user.cpp:11:8: note: candidate expects 1 argument, 2 provided
user.cpp: In function ‘void insertH(int, int)’:
user.cpp:71:23: error: no matching function for call to ‘item::item(int&, int&)’
H[N] = Item(nod, cost);
^
user.cpp:71:23: note: candidates are:
user.cpp:11:8: note: item::item()
struct item {
^
user.cpp:11:8: note: candidate expects 0 arguments, 2 provided
user.cpp:11:8: note: constexpr item::item(const item&)
user.cpp:11:8: note: candidate expects 1 argument, 2 provided
user.cpp:11:8: note: constexpr item::item(item&&)
user.cpp:11:8: note: candidate expects 1 argument, 2 provided
user.cpp: In function ‘void dijkstra()’:
user.cpp:102:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < adj[p.nod].size(); i++){
^
user.cpp: In function ‘int main()’:
user.cpp:123:15: error: ‘INT_MAX’ was not declared in this scope
insertH(i, INT_MAX);
^
user.cpp:114:36: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("dijkstra.in", "r", stdin);
^
user.cpp:115:38: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("dijkstra.out", "w", stdout);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !