Borderou de evaluare (job #1193208)
Utilizator | Data | 31 mai 2014 11:49:51 | |
---|---|---|---|
Problema | Catun | 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:58:16: error: no matching function for call to ‘std::vector<int>::insert(int&)’
fort.insert(x);
^
user.cpp:58:16: note: candidates are:
In file included from /usr/include/c++/4.8/vector:69:0,
from user.cpp:4:
/usr/include/c++/4.8/bits/vector.tcc:107:5: note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::iterator, const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = int*; std::vector<_Tp, _Alloc>::value_type = int]
vector<_Tp, _Alloc>::
^
/usr/include/c++/4.8/bits/vector.tcc:107:5: note: candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/4.8/vector:64:0,
from user.cpp:4:
/usr/include/c++/4.8/bits/stl_vector.h:988:7: note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::iterator, std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = int*; std::vector<_Tp, _Alloc>::value_type = int]
insert(iterator __position, value_type&& __x)
^
/usr/include/c++/4.8/bits/stl_vector.h:988:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/4.8/bits/stl_vector.h:1005:7: note: void std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::iterator, std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = int*]
insert(iterator __position, initializer_list<value_type> __l)
^
/usr/include/c++/4.8/bits/stl_vector.h:1005:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/4.8/bits/stl_vector.h:1023:7: note: void std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::iterator, std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = int*; std::vector<_Tp, _Alloc>::size_type = unsigned int; std::vector<_Tp, _Alloc>::value_type = int]
insert(iterator __position, size_type __n, const value_type& __x)
^
/usr/include/c++/4.8/bits/stl_vector.h:1023:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/4.8/bits/stl_vector.h:1044:9: note: template<class _InputIterator, class> void std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::iterator, _InputIterator, _InputIterator) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _Tp = int; _Alloc = std::allocator<int>]
insert(iterator __position, _InputIterator __first,
^
/usr/include/c++/4.8/bits/stl_vector.h:1044:9: note: template argument deduction/substitution failed:
user.cpp:58:16: note: cannot convert ‘x’ (type ‘int’) to type ‘std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}’
fort.insert(x);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !