Why am I getting this error?
1 2 3 4 5 6 7
|
#include <iostream>
#include <vector>
#include <cstdlib>
vector<int> group1r;
vector<string> group1;
group1r.insert(cnt,(rand() % group1.size()/2) + 1);
|
H:\Vecterz.cpp In function `int main()':
177 H:\Vecterz.cpp no matching function for call to `std::vector<int, std::allocator<int> >::insert(int&, unsigned int)'
note H:\Dev-Cpp\include\c++\3.4.2\bits\vector.tcc:92 candidates are: typename std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(__gnu_cxx::__normal_iterator<typename _Alloc::pointer, std::vector<_Tp, _Alloc> >, const _Tp&) [with _Tp = int, _Alloc = std::allocator<int>]
note H:\Dev-Cpp\include\c++\3.4.2\bits\vector.tcc:92 void std::vector<_Tp, _Alloc>::insert(__gnu_cxx::__normal_iterator<typename _Alloc::pointer, std::vector<_Tp, _Alloc> >, size_t, const _Tp&) [with _Tp = int, _Alloc = std::allocator<int>]