Skip to content

Latest commit

 

History

History
17 lines (9 loc) · 348 Bytes

11.17.md

File metadata and controls

17 lines (9 loc) · 348 Bytes

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.