From Jason Turner

[stream.iterators.general]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpksi2wkie/{from.md → to.md} +19 -0
tmp/tmpksi2wkie/{from.md → to.md} RENAMED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### General <a id="stream.iterators.general">[[stream.iterators.general]]</a>
2
+
3
+ To make it possible for algorithmic templates to work directly with
4
+ input/output streams, appropriate iterator-like class templates are
5
+ provided.
6
+
7
+ [*Example 1*:
8
+
9
+ ``` cpp
10
+ partial_sum(istream_iterator<double, char>(cin),
11
+ istream_iterator<double, char>(),
12
+ ostream_iterator<double, char>(cout, "\n"));
13
+ ```
14
+
15
+ reads a file containing floating-point numbers from `cin`, and prints
16
+ the partial sums onto `cout`.
17
+
18
+ — *end example*]
19
+