1//it_start and it_end are the start and end iterators of your container
2//(ie. vec.begin() and vec.end())
3//T is the type of your container (for example, for a std::vector<int> then
4//T is int)
5//separator is a string that will be inserted between each element
6
7std::copy(it_start, it_end, std::ostream_iterator<T>(std::cout, separator));