Borderou de evaluare (job #1800998)

Utilizator lorundlorund lorund Data 8 noiembrie 2016 15:33:12
Problema Componente tare conexe Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:41:45: error: declaration of ‘weight weight’ void add_edge(type src, type dst, weight weight); ^ user.cpp:19:28: error: shadows template parm ‘class weight’ template <typename type, typename weight = void> ^ user.cpp:144:65: error: declaration of ‘weight weight’ void Graph<type, weight>::add_edge(type src, type dst, weight weight) { ^ user.cpp:143:28: error: shadows template parm ‘class weight’ template <typename type, typename weight> ^ user.cpp: In member function ‘void GML::Utils::Graph<type, weight>::add_edge(type, type, weight)’: user.cpp:144:8: error: declaration of ‘weight weight’ void Graph<type, weight>::add_edge(type src, type dst, weight weight) { ^ user.cpp:143:28: error: shadows template parm ‘class weight’ template <typename type, typename weight> ^ user.cpp: In member function ‘void GML::Utils::Graph<type, weight>::remove_edge_if(GML::Utils::Graph<type, weight>::Predicate)’: user.cpp:160:39: error: there are no arguments to ‘swap’ that depend on a template parameter, so a declaration of ‘swap’ must be available [-fpermissive] swap(adj[tr][gr], adj[tr].back()); ^ user.cpp:160:39: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) user.cpp: In member function ‘void GML::Utils::Graph<type, void>::remove_edge_if(GML::Utils::Graph<type, void>::Predicate)’: user.cpp:286:4: error: ‘T’ was not declared in this scope T src, dst; ^ user.cpp:286:6: error: expected ‘;’ before ‘src’ T src, dst; ^ user.cpp:289:5: error: ‘src’ was not declared in this scope src = i2v[tr]; ^ user.cpp:291:6: error: ‘dst’ was not declared in this scope dst = i2v[adj[tr][gr]]; ^ user.cpp:293:39: error: there are no arguments to ‘swap’ that depend on a template parameter, so a declaration of ‘swap’ must be available [-fpermissive] swap(adj[tr][gr], adj[tr].back()); ^ user.cpp: At global scope: user.cpp:301:9: error: redefinition of default argument for ‘class weight’ class StronglyConnectedComponents { ^ user.cpp:11:28: note: original definition appeared here template <typename type, typename weight = void> ^ user.cpp: In function ‘int main()’: user.cpp:387:38: error: incomplete type ‘GML::Utils::StronglyConnectedComponents<unsigned int, void>’ used in nested name specifier vector<vector<size_t>> components = StronglyConnectedComponents<size_t>::build(g);

Ceva nu functioneaza?