Node:Stream iterators, Next:Algorithms, Previous:Containers, Up:Top
To make it possible for algorithmic templates to work directly with
input/output streams, appropriate iterator-like template classes are
provided. For example,
partial_sum_copy(istream_iterator(cin),istream_iterator (), ostream_iterator (cout, "\n"));
reads a file containing floating point numbers from cin, and
prints the partial sums onto cout.