one question about std::cin
<pre><code>int i,j;

std::string s;

std::cin&gt;&gt;i&gt;&gt;j&gt;&gt;s&gt;&gt;s&gt;&gt;i;

std::cout&lt;&lt;i&lt;&lt;" "&lt;&lt;j&lt;&lt;" "&lt;&lt;s&lt;&lt;" "&lt;&lt;i;
</code></pre>

<p>Question
Referring to the sample code above, what's the displayed output if the input string given is: "5 10 Sample Word 15 20"?</p>

<p>The answer is </p>

<p>15 10 Word 15</p>

<p>I have the question is what's the underline policy for cin to over write the existing values? Does the  latter one simply overwrite the previous one? Is there any other situations?</p>

<p>I checked many books, but I didn't find one which explain this. </p>
