[stream.iterators.general]

# 24 Iterators library [[iterators]](./#iterators)

## 24.6 Stream iterators [[stream.iterators]](stream.iterators#general)

### 24.6.1 General [stream.iterators.general]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L6483)

To make it possible for algorithmic templates to work directly with input/output streams, appropriate
iterator-like
class templates
are provided[.](#1.sentence-1)

[*Example [1](#example-1)*:

partial_sum(istream_iterator<double, char>(cin),
 istream_iterator<double, char>(),
 ostream_iterator<double, char>(cout, "\n")); reads a file containing floating-point numbers fromcin,
and prints the partial sums ontocout[.](#1.sentence-2)

â *end example*]
