Vektorius
Taškai: 0
Compile: FAIL
vektorius.cpp: In function ‘int main()’: vektorius.cpp:15:10: error: no matching function for call to ‘std::vector<int>::insert(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&, int)’ 15 | v1.insert(v1.back(), 1); | ~~~~~~~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/11/vector:67, from vektorius.cpp:2: /usr/include/c++/11/bits/stl_vector.h:1379:9: note: candidate: ‘template<class _InputIterator, class> std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, _InputIterator, _InputIterator) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _Tp = int; _Alloc = std::allocator<int>]’ 1379 | insert(const_iterator __position, _InputIterator __first, | ^~~~~~ /usr/include/c++/11/bits/stl_vector.h:1379:9: note: template argument deduction/substitution failed: vektorius.cpp:15:10: note: candidate expects 3 arguments, 2 provided 15 | v1.insert(v1.back(), 1); | ~~~~~~~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/11/vector:72, from vektorius.cpp:2: /usr/include/c++/11/bits/vector.tcc:130:5: note: candidate: ‘std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = std::vector<int>::iterator; std::vector<_Tp, _Alloc>::const_iterator = std::vector<int>::const_iterator; std::vector<_Tp, _Alloc>::value_type = int]’ 130 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/bits/vector.tcc:132:27: note: no known conversion for argument 1 from ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’} to ‘std::vector<int>::const_iterator’ 132 | insert(const_iterator __position, const value_type& __x) | ~~~~~~~~~~~~~~~^~~~~~~~~~ In file included from /usr/include/c++/11/vector:67, from vektorius.cpp:2: /usr/include/c++/11/bits/stl_vector.h:1293:7: note: candidate: ‘std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = std::vector<int>::iterator; std::vector<_Tp, _Alloc>::const_iterator = std::vector<int>::const_iterator; std::vector<_Tp, _Alloc>::value_type = int]’ 1293 | insert(const_iterator __position, value_type&& __x) | ^~~~~~ /usr/include/c++/11/bits/stl_vector.h:1293:29: note: no known conversion for argument 1 from ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’} to ‘std::vector<int>::const_iterator’ 1293 | insert(const_iterator __position, value_type&& __x) | ~~~~~~~~~~~~~~~^~~~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:1310:7: note: candidate: ‘std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = std::vector<int>::iterator; std::vector<_Tp, _Alloc>::const_iterator = std::vector<int>::const_iterator]’ 1310 | insert(const_iterator __position, initializer_list<value_type> __l) | ^~~~~~ /usr/include/c++/11/bits/stl_vector.h:1310:29: note: no known conversion for argument 1 from ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’} to ‘std::vector<int>::const_iterator’ 1310 | insert(const_iterator __position, initializer_list<value_type> __l) | ~~~~~~~~~~~~~~~^~~~~~~~~~ /usr/include/c++/11/bits/stl_vector.h:1335:7: note: candidate: ‘std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::const_iterator, std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = std::vector<int>::iterator; std::vector<_Tp, _Alloc>::const_iterator = std::vector<int>::const_iterator; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = int]’ 1335 | insert(const_iterator __position, size_type __n, const value_type& __x) | ^~~~~~ /usr/include/c++/11/bits/stl_vector.h:1335:7: note: candidate expects 3 arguments, 2 provided vektorius.cpp:16:1: error: ‘sort’ was not declared in this scope; did you mean ‘short’? 16 | sort(v1.begin(), v1.end()); | ^~~~ | short vektorius.cpp:18:1: error: ‘reverse’ was not declared in this scope 18 | reverse(v1.begin(), v1.end()); | ^~~~~~~ vektorius.cpp:20:5: error: no matching function for call to ‘fill(std::vector<int>::iterator, std::vector<int>::iterator)’ 20 | fill(v1.begin(), v1.end()); | ~~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/ios:40, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from vektorius.cpp:1: /usr/include/c++/11/bits/stl_algobase.h:992:5: note: candidate: ‘template<class _ForwardIterator, class _Tp> void std::fill(_ForwardIterator, _ForwardIterator, const _Tp&)’ 992 | fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) | ^~~~ /usr/include/c++/11/bits/stl_algobase.h:992:5: note: template argument deduction/substitution failed: vektorius.cpp:20:5: note: candidate expects 3 arguments, 2 provided 20 | fill(v1.begin(), v1.end()); | ~~~~^~~~~~~~~~~~~~~~~~~~~~
nr. | result | time | message |
---|