ostreambuf_iterator<T>

An ostreambuf_iterator is an iterator adapter that writes raw binary data to an output stream. Dereferencing and writing to an ostreambuf_iterator writes unformatted data to the stream.

ostreambuf_iterator is a template type whose type argument is the data type to hold the raw binary data read. In almost all cases, this should be char.

ostream_iterator<T> Member Functions
ostreambuf_iterator<T>(ostream &input)
Constructs an ostreambuf_iterator that writes binary data to the specified stream.
copy(v.begin(), v.end(), ostreambuf_iterator<char>(cout)); //Write binary data from v to cout.

Constructs a new ostreambuf_iterator that writes to the specified stream.