0_0_13753839_334.cpp: In function 'int main()':
0_0_13753839_334.cpp:30:30: error: no matching function for call to 'std::vector<int>::insert(int)'
mp[c[x]].insert(i+1);
^
0_0_13753839_334.cpp:30:30: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:69:0,
from 0_0_13753839_334.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/vector.tcc:107:5: note: 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 = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = int*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const int*, std::vector<int> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const int*; std::vector<_Tp, _Alloc>::value_type = int]
vector<_Tp, _Alloc>::
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/vector.tcc:107:5: note: candidate expects 2 arguments, 1 provided
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:64:0,
from 0_0_13753839_334.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1014:7: note: 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 = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = int*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const int*, std::vector<int> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const int*; std::vector<_Tp, _Alloc>::value_type = int]
insert(const_iterator __position, value_type&& __x)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1014:7: note: candidate expects 2 arguments, 1 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1031:7: note: 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 = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = int*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const int*, std::vector<int> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const int*]
insert(const_iterator __position, initializer_list<value_type> __l)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1031:7: note: candidate expects 2 arguments, 1 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1051:7: note: 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 = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = int*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const int*, std::vector<int> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const int*; std::vector<_Tp, _Alloc>::size_type = long long unsigned int; std::vector<_Tp, _Alloc>::value_type = int]
insert(const_iterator __position, size_type __n, const value_type& __x)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1051:7: note: candidate expects 3 arguments, 1 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1095:9: note: 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>]
insert(const_iterator __position, _InputIterator __first,
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:1095:9: note: template argument deduction/substitution failed:
0_0_13753839_334.cpp:30:28: note: cannot convert '(i + 1)' (type 'int') to type 'std::vector<int>::const_iterator {aka __gnu_cxx::__normal_iterator<const int*, std::vector<int> >}'
mp[c[x]].insert(i+1);
^
|