Borderou de evaluare (job #2351668)

Utilizator marlenchelba@yahoo.comMarilena Chelba [email protected] Data 22 februarie 2019 16:48:17
Problema Charlie Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'std::pair<std::__cxx11::basic_string<char>, int> solve_2(std::__cxx11::string&)': main.cpp:70:54: error: no matching function for call to 'make_pair(std::__cxx11::string&, int&)' return std::make_pair<std::string, int>(str, cost); ^ In file included from /usr/include/c++/6/bits/stl_algobase.h:64:0, from /usr/include/c++/6/bits/char_traits.h:39, from /usr/include/c++/6/ios:40, from /usr/include/c++/6/istream:38, from /usr/include/c++/6/fstream:38, from main.cpp:1: /usr/include/c++/6/bits/stl_pair.h:497:5: note: candidate: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) make_pair(_T1&& __x, _T2&& __y) ^~~~~~~~~ /usr/include/c++/6/bits/stl_pair.h:497:5: note: template argument deduction/substitution failed: main.cpp:70:45: note: cannot convert 'str' (type 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}') to type 'std::__cxx11::basic_string<char>&&' return std::make_pair<std::string, int>(str, cost); ^~~ Non zero exit status: 1

Ceva nu functioneaza?