As suggested by
enhzflep, it is the first parameter that doesn't fit.
Try
#include <vector>
#include <string>
#include <iostream>
using namespace std;
int main()
{
vector< string > v;
v.push_back("A");
v.push_back("C");
vector< string >::iterator it = v.begin() + 1;
v.insert( it, "B");
for (size_t n=0; n<v.size(); ++n)
cout << v[n] << endl;
}
or, using
C++11
#include <vector>
#include <string>
#include <iostream>
using namespace std;
int main()
{
vector< string > v;
v.push_back("A");
v.push_back("C");
auto it = v.begin() + 1;
v.insert( it, "B");
for (const auto & x : v)
cout << x << endl;
}