Borderou de evaluare (job #1689229)

Utilizator traklejohn james trakle Data 14 aprilie 2016 04:29:15
Problema Mayonaka Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:36:59: error: parameter declared ‘auto’ sort(begin(kangaroos), end(kangaroos), [](const auto& k1, const auto& k2) ^ user.cpp:36:75: error: parameter declared ‘auto’ sort(begin(kangaroos), end(kangaroos), [](const auto& k1, const auto& k2) ^ user.cpp: In lambda function: user.cpp:38:16: error: ‘k1’ was not declared in this scope return k1.y > k2.y; ^ user.cpp:38:23: error: ‘k2’ was not declared in this scope return k1.y > k2.y; ^ user.cpp: In function ‘int main()’: user.cpp:41:66: error: parameter declared ‘auto’ stable_sort(begin(kangaroos), end(kangaroos), [](const auto& k1, const auto& k2) ^ user.cpp:41:82: error: parameter declared ‘auto’ stable_sort(begin(kangaroos), end(kangaroos), [](const auto& k1, const auto& k2) ^ user.cpp: In lambda function: user.cpp:43:16: error: ‘k1’ was not declared in this scope return k1.x < k2.x; ^ user.cpp:43:23: error: ‘k2’ was not declared in this scope return k1.x < k2.x; ^ user.cpp: In function ‘int main()’: user.cpp:73:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(index >= inds.size()) ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from user.cpp:6: /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Kangaroo*, std::vector<Kangaroo> >; _Compare = main()::__lambda0]’: /usr/include/c++/4.8/bits/stl_algo.h:2250:70: required from ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Kangaroo*, std::vector<Kangaroo> >; _Compare = main()::__lambda0]’ /usr/include/c++/4.8/bits/stl_algo.h:5514:55: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<Kangaroo*, std::vector<Kangaroo> >; _Compare = main()::__lambda0]’ user.cpp:39:6: required from here /usr/include/c++/4.8/bits/stl_algo.h:2183:29: error: no match for call to ‘(main()::__lambda0) (Kangaroo&, Kangaroo&)’ if (__comp(*__i, *__first)) ^ user.cpp:36:45: note: candidates are: sort(begin(kangaroos), end(kangaroos), [](const auto& k1, const auto& k2) ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from user.cpp:6: /usr/include/c++/4.8/bits/stl_algo.h:2183:29: note: void (*)() <conversion> if (__comp(*__i, *__first)) ^ /usr/include/c++/4.8/bits/stl_algo.h:2183:29: note: candidate expects 1 argument, 3 provided

Ceva nu functioneaza?