I think if you have tried out the code and found out it worked fine, you have to say straight outloud that your tutorial is in skepticism.
Okay, there might be another way to explain the situation, first you cout the first value of r and then when it is given by the second value, it once again put this out up onto the screen. Is that correct ? GEORGE ?
--------
Assignment through the same value of the iterator should happen only once.
ostream_iterator<int> r (cout);
*r = 0;
*r = 1;
is not a valid code sequence.
--------
when you just give out such a piece of information, it might not be a correct tutorial. But it might be another answer if you give some other information above this. .
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.