Assume multiset<string> c; vector<string> v;
, then
copy(v.begin(), v.end(), inserter(c, c.end()));
is OK.
copy(v.begin(), v.end(), back_inserter(c));
is error. A multiset
doesn't have push_back
memeber function.
copy(c.begin(), c.end(), inserter(v, v.end()));
is OK.
copy(c.begin(), c.end(), back_inserter(v));
is OK.