input stream versus getline in C++
<p>I have a character array <code>char input[11];</code>. I have a loop:</p>

<pre><code>do {
  is &gt;&gt; input;      // is is an input stream defined by istream&amp; is
} while (something)
// works fine

do {
  is.getline(input, 11);
} while (something)
/* i enter 10 digits and press enter, cursor still blinks,
i enter another value and finally it proceeds to the next piece of code */
</code></pre>

<p>What is the difference between the two, why does one read in all 11 characters (10 digits + enter) and the other is left hanging?</p>
