Paieška 3

Taškai: 0

Compile: FAIL

paieska3.cpp: In function ‘int main()’: paieska3.cpp:30:17: error: no match for ‘operator+’ (operand types are ‘std::vector<int>’ and ‘int’) sort(x.a,x.a+n,rusiuoti()); ^ In file included from /usr/include/c++/5/bits/stl_algobase.h:67:0, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/ios:40, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from paieska3.cpp:1: /usr/include/c++/5/bits/stl_iterator.h:334:5: note: candidate: template<class _Iterator> std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&) operator+(typename reverse_iterator<_Iterator>::difference_type __n, ^ /usr/include/c++/5/bits/stl_iterator.h:334:5: note: template argument deduction/substitution failed: paieska3.cpp:30:18: note: mismatched types ‘const std::reverse_iterator<_Iterator>’ and ‘int’ sort(x.a,x.a+n,rusiuoti()); ^ In file included from /usr/include/c++/5/bits/stl_algobase.h:67:0, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/ios:40, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from paieska3.cpp:1: /usr/include/c++/5/bits/stl_iterator.h:1152:5: note: candidate: template<class _Iterator> std::move_iterator<_Iterator> std::operator+(typename std::move_iterator<_Iterator>::difference_type, const std::move_iterator<_Iterator>&) operator+(typename move_iterator<_Iterator>::difference_type __n, ^ /usr/include/c++/5/bits/stl_iterator.h:1152:5: note: template argument deduction/substitution failed: paieska3.cpp:30:18: note: mismatched types ‘const std::move_iterator<_Iterator>’ and ‘int’ sort(x.a,x.a+n,rusiuoti()); ^ In file included from /usr/include/c++/5/string:52:0, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/bits/ios_base.h:41, from /usr/include/c++/5/ios:42, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from paieska3.cpp:1: /usr/include/c++/5/bits/basic_string.h:4783:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, ^ /usr/include/c++/5/bits/basic_string.h:4783:5: note: template argument deduction/substitution failed: paieska3.cpp:30:18: note: ‘std::vector<int>’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ sort(x.a,x.a+n,rusiuoti()); ^ In file included from /usr/include/c++/5/string:53:0, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/bits/ios_base.h:41, from /usr/include/c++/5/ios:42, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from paieska3.cpp:1: /usr/include/c++/5/bits/basic_string.tcc:1151:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) operator+(const _CharT* __lhs, ^ /usr/include/c++/5/bits/basic_string.tcc:1151:5: note: template argument deduction/substitution failed: paieska3.cpp:30:18: note: mismatched types ‘const _CharT*’ and ‘std::vector<int>’ sort(x.a,x.a+n,rusiuoti()); ^ In file included from /usr/include/c++/5/string:53:0, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/bits/ios_base.h:41, from /usr/include/c++/5/ios:42, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from paieska3.cpp:1: /usr/include/c++/5/bits/basic_string.tcc:1167:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) ^ /usr/include/c++/5/bits/basic_string.tcc:1167:5: note: template argument deduction/substitution failed: paieska3.cpp:30:18: note: mismatched types ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’ sort(x.a,x.a+n,rusiuoti()); ^ In file included from /usr/include/c++/5/string:52:0, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/bits/ios_base.h:41, from /usr/include/c++/5/ios:42, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from paieska3.cpp:1: /usr/include/c++/5/bits/basic_string.h:4820:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*) operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, ^ /usr/include/c++/5/bits/basic_string.h:4820:5: note: template argument deduction/substitution failed: paieska3.cpp:30:18: note: ‘std::vector<int>’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ sort(x.a,x.a+n,rusiuoti()); ^ In file included from /usr/include/c++/5/string:52:0, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/bits/ios_base.h:41, from /usr/include/c++/5/ios:42, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from paieska3.cpp:1: /usr/include/c++/5/bits/basic_string.h:4836:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, _CharT) operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) ^ /usr/include/c++/5/bits/basic_string.h:4836:5: note: template argument deduction/substitution failed: paieska3.cpp:30:18: note: ‘std::vector<int>’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ sort(x.a,x.a+n,rusiuoti()); ^ In file included from /usr/include/c++/5/string:52:0, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/bits/ios_base.h:41, from /usr/include/c++/5/ios:42, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from paieska3.cpp:1: /usr/include/c++/5/bits/basic_string.h:4848:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, ^ /usr/include/c++/5/bits/basic_string.h:4848:5: note: template argument deduction/substitution failed: paieska3.cpp:30:18: note: ‘std::vector<int>’ is not derived from ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ sort(x.a,x.a+n,rusiuoti()); ^ In file included from /usr/include/c++/5/string:52:0, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/bits/ios_base.h:41, from /usr/include/c++/5/ios:42, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from paieska3.cpp:1: /usr/include/c++/5/bits/basic_string.h:4854:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, ^ /usr/include/c++/5/bits/basic_string.h:4854:5: note: template argument deduction/substitution failed: paieska3.cpp:30:18: note: ‘std::vector<int>’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ sort(x.a,x.a+n,rusiuoti()); ^ In file included from /usr/include/c++/5/string:52:0, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/bits/ios_base.h:41, from /usr/include/c++/5/ios:42, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from paieska3.cpp:1: /usr/include/c++/5/bits/basic_string.h:4860:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, ^ /usr/include/c++/5/bits/basic_string.h:4860:5: note: template argument deduction/substitution failed: paieska3.cpp:30:18: note: ‘std::vector<int>’ is not derived from ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ sort(x.a,x.a+n,rusiuoti()); ^ In file included from /usr/include/c++/5/string:52:0, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/bits/ios_base.h:41, from /usr/include/c++/5/ios:42, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from paieska3.cpp:1: /usr/include/c++/5/bits/basic_string.h:4872:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) operator+(const _CharT* __lhs, ^ /usr/include/c++/5/bits/basic_string.h:4872:5: note: template argument deduction/substitution failed: paieska3.cpp:30:18: note: mismatched types ‘const _CharT*’ and ‘std::vector<int>’ sort(x.a,x.a+n,rusiuoti()); ^ In file included from /usr/include/c++/5/string:52:0, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/bits/ios_base.h:41, from /usr/include/c++/5/ios:42, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from paieska3.cpp:1: /usr/include/c++/5/bits/basic_string.h:4878:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) operator+(_CharT __lhs, ^ /usr/include/c++/5/bits/basic_string.h:4878:5: note: template argument deduction/substitution failed: paieska3.cpp:30:18: note: mismatched types ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’ sort(x.a,x.a+n,rusiuoti()); ^ In file included from /usr/include/c++/5/string:52:0, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/bits/ios_base.h:41, from /usr/include/c++/5/ios:42, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from paieska3.cpp:1: /usr/include/c++/5/bits/basic_string.h:4884:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _CharT*) operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, ^ /usr/include/c++/5/bits/basic_string.h:4884:5: note: template argument deduction/substitution failed: paieska3.cpp:30:18: note: ‘std::vector<int>’ is not derived from ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ sort(x.a,x.a+n,rusiuoti()); ^ In file included from /usr/include/c++/5/string:52:0, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/bits/ios_base.h:41, from /usr/include/c++/5/ios:42, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from paieska3.cpp:1: /usr/include/c++/5/bits/basic_string.h:4890:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, _CharT) operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, ^ /usr/include/c++/5/bits/basic_string.h:4890:5: note: template argument deduction/substitution failed: paieska3.cpp:30:18: note: ‘std::vector<int>’ is not derived from ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ sort(x.a,x.a+n,rusiuoti()); ^ In file included from /usr/include/c++/5/vector:65:0, from paieska3.cpp:2: /usr/include/c++/5/bits/stl_bvector.h:297:3: note: candidate: std::_Bit_iterator std::operator+(std::ptrdiff_t, const std::_Bit_iterator&) operator+(ptrdiff_t __n, const _Bit_iterator& __x) ^ /usr/include/c++/5/bits/stl_bvector.h:297:3: note: no known conversion for argument 1 from ‘std::vector<int>’ to ‘std::ptrdiff_t {aka long int}’ /usr/include/c++/5/bits/stl_bvector.h:387:3: note: candidate: std::_Bit_const_iterator std::operator+(std::ptrdiff_t, const std::_Bit_const_iterator&) operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) ^ /usr/include/c++/5/bits/stl_bvector.h:387:3: note: no known conversion for argument 1 from ‘std::vector<int>’ to ‘std::ptrdiff_t {aka long int}’ In file included from /usr/include/c++/5/bits/stl_algobase.h:67:0, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/ios:40, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from paieska3.cpp:1: /usr/include/c++/5/bits/stl_iterator.h:930:5: note: candidate: template<class _Iterator, class _Container> __gnu_cxx::__normal_iterator<_Iterator, _Container> __gnu_cxx::operator+(typename __gnu_cxx::__normal_iterator<_Iterator, _Container>::difference_type, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&) operator+(typename __normal_iterator<_Iterator, _Container>::difference_type ^ /usr/include/c++/5/bits/stl_iterator.h:930:5: note: template argument deduction/substitution failed: paieska3.cpp:30:18: note: mismatched types ‘const __gnu_cxx::__normal_iterator<_Iterator, _Container>’ and ‘int’ sort(x.a,x.a+n,rusiuoti()); ^ paieska3.cpp:30:29: error: too few arguments to function ‘bool rusiuoti(intr, intr)’ sort(x.a,x.a+n,rusiuoti()); ^ paieska3.cpp:8:6: note: declared here bool rusiuoti(intr lhs , intr rhs) ^ paieska3.cpp:30:30: error: ‘sort’ was not declared in this scope sort(x.a,x.a+n,rusiuoti()); ^ paieska3.cpp:35:1: error: expected primary-expression before ‘}’ token } ^

nr.resulttimemessage