1
ostream_iterator<type>(stream_object, "seperator"), 配合诸多算法使用。 type是指插入到stream_object的对象类型。
例如
vector<string> vs;
vs.push_back(),
vs.push_back(),
vs.push_back(),
vs.push_back()
copy(vs.begin(), vs.end(), ostream_iterator<string>(cout, "/n"));
含义是将vs中的字符串, 逐行输出到cout。
2
back_inserter, front_inserter的参数是容器。 将迭代器的赋值操作改为插入操作