Borderou de evaluare (job #3030996)

Utilizator TirilaPatricTirila Patric-Gabriel TirilaPatric Data 18 martie 2023 11:01:24
Problema Sortare prin comparare Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:39:33: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'void') 39 | V = sortare(V, 0, V.size()-1); | ^ In file included from /usr/include/c++/12.2.1/vector:70, from main.cpp:2: /usr/include/c++/12.2.1/bits/vector.tcc:204:5: note: candidate: 'constexpr std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]' 204 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/12.2.1/bits/vector.tcc:205:42: note: no known conversion for argument 1 from 'void' to 'const std::vector<int>&' 205 | operator=(const vector<_Tp, _Alloc>& __x) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from /usr/include/c++/12.2.1/vector:64: /usr/include/c++/12.2.1/bits/stl_vector.h:761:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]' 761 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_vector.h:761:26: note: no known conversion for argument 1 from 'void' to 'std::vector<int>&&' 761 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) | ~~~~~~~~~^~~ /usr/include/c++/12.2.1/bits/stl_vector.h:783:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]' 783 | operator=(initializer_list<value_type> __l) | ^~~~~~~~ /usr/include/c++/12.2.1/bits/stl_vector.h:783:46: note: no known conversion for argument 1 from 'void' to 'std::initializer_list<int>' 783 | operator=(initializer_list<value_type> __l) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ Non zero exit status: 1

Ceva nu functioneaza?