if you have a vector "v"
copy(v.begin(), v.end(), ostream_iterator
this will print the entire vector .
To generalize this you could use something like this :
template
OutputIterator copy(const Container& c, OutputIterator result){
return std::copy(c.begin(), c.end(), result);
}
No comments:
Post a Comment