Borderou de evaluare (job #1692894)

Utilizator y0rgEmacu Geo y0rg Data 21 aprilie 2016 21:54:51
Problema Arbore partial de cost minim Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:63:24: error: template argument 1 is invalid typedef pair<tuple, int> triple; ^ user.cpp:63:32: error: invalid type in declaration before ‘;’ token typedef pair<tuple, int> triple; ^ user.cpp: In member function ‘bool comparator::operator()(triple, triple)’: user.cpp:69:14: error: request for member ‘second’ in ‘x’, which is of non-class type ‘triple {aka int}’ return x.second > y.second; ^ user.cpp:69:25: error: request for member ‘second’ in ‘y’, which is of non-class type ‘triple {aka int}’ return x.second > y.second; ^ user.cpp: In function ‘void print_triple(std::ostream&, triple)’: user.cpp:75:14: error: request for member ‘first’ in ‘x’, which is of non-class type ‘triple {aka int}’ out << x.first.first << ", " << x.first.second << " ->" << x.second << endl; ^ user.cpp:75:39: error: request for member ‘first’ in ‘x’, which is of non-class type ‘triple {aka int}’ out << x.first.first << ", " << x.first.second << " ->" << x.second << endl; ^ user.cpp:75:66: error: request for member ‘second’ in ‘x’, which is of non-class type ‘triple {aka int}’ out << x.first.first << ", " << x.first.second << " ->" << x.second << endl; ^ user.cpp: In function ‘void print_edge(std::ostream&, triple)’: user.cpp:80:14: error: request for member ‘first’ in ‘x’, which is of non-class type ‘triple {aka int}’ out << x.first.first << " " << x.first.second << endl; ^ user.cpp:80:38: error: request for member ‘first’ in ‘x’, which is of non-class type ‘triple {aka int}’ out << x.first.first << " " << x.first.second << endl; ^ user.cpp: In function ‘int main()’: user.cpp:102:40: error: expression list treated as compound expression in functional cast [-fpermissive] heap.push(triple(tuple(x, y), c)); ^ user.cpp:102:25: error: expected primary-expression before ‘(’ token heap.push(triple(tuple(x, y), c)); ^ user.cpp:102:26: error: reference to ‘tuple’ is ambiguous heap.push(triple(tuple(x, y), c)); ^ user.cpp:62:24: note: candidates are: typedef struct std::pair<int, int> tuple typedef pair<int, int> tuple; ^ 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/istream:38, from /usr/include/c++/4.8/fstream:38, from user.cpp:1: /usr/include/c++/4.8/bits/stl_pair.h:83:11: note: template<class ...> class std::tuple

Ceva nu functioneaza?