[Univ of Cambridge] [Dept of Engineering]
next up previous contents
Next: Output of User-Defined types Up: Input/Output Previous: Formatting

Stream Iterators

Iterators can be used on streams, providing an elegant way to integrate I/O with container classes. You've seen them already in the Standard Library section.

ostream_iterator<string> oo (cout);
int main()
*oo = "Hello";
++oo;
*oo = "World";



Tim Love
2001-07-05