title: cin.ignore() and cin.clear() in C++
body: <p>So I understand that a piece of code:</p>
  
  <pre><code>cin.ignore(80, '\n');
  </code></pre>
  
  <p>will clear the buffer of up to 80 characters until it hits a return (Enter key) and stop... right?</p>
  
  <p>Here are the questions...</p>
  
  <p>1) What is different about simply doing <code>cin.ignore();</code> with no parameters? Which is better used in what situation?</p>
  
  <p>2) <code>cin.clear();</code> says it clears error flags... what does this mean? What are error flags and why do you want them cleared?</p>
  
  <p>Thanks!</p>