Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Write STL Container To Output Stream

DZone's Guide to

Write STL Container To Output Stream

·
Free Resource

//write all elements without any delimiter
copy (coll.begin(), coll.end(), ostream_iterator(cout));

reff : josutis, pg. 278


//with boost
for_each(coll.begin(), coll.end(), cout << _1);


Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}