title: What cin.ignore() does exactly?
body: <p>I've been told by my professor that every time I use <code>cin</code>, I should always follow it with <code>cin.ignore(100, '\n')</code>. But, I never understood why?</p>
  
  <p>Here is an example:</p>
  
  <pre><code>const int MAX = 200;
  char input[MAX];
  
  cout &lt;&lt; "Enter something: ";
      cin.get(input, MAX);
      cin.ignore(100, '\n'); //why necessary?!!
  </code></pre>