Borderou de evaluare (job #1654472)

Utilizator andreioneaAndrei Onea andreionea Data 17 martie 2016 04:54:11
Problema Diametrul unui arbore Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In member function ‘Result Tree::FarthestViaBFS(int)’: user.cpp:30:37: error: parameter declared ‘auto’ [&diameter, &q, currNode](auto& node) ^ user.cpp: In lambda function: user.cpp:32:20: error: ‘node’ was not declared in this scope if (!diameter[node.second]) ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from user.cpp:5: /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = std::__detail::_Node_iterator<std::pair<const int, int>, false, false>; _Funct = Tree::FarthestViaBFS(int)::__lambda0]’: user.cpp:37:6: required from here /usr/include/c++/4.8/bits/stl_algo.h:4440:14: error: no match for call to ‘(Tree::FarthestViaBFS(int)::__lambda0) (std::pair<const int, int>&)’ __f(*__first); ^ user.cpp:30:29: note: candidate is: [&diameter, &q, currNode](auto& node) ^ user.cpp:30:41: note: Tree::FarthestViaBFS(int)::__lambda0 [&diameter, &q, currNode](auto& node) ^ user.cpp:30:41: note: candidate expects 0 arguments, 1 provided

Ceva nu functioneaza?