title: Why do I have to press enter Twice?
body: <p>For some reason in my program when I reach a certain spot, I have to press <kbd>Enter</kbd> twice in order to get it to submit. I added the clear to keep it from skipping input and the ignore() to keep it from keeping any extra characters in the buffer. I enter my input and then it drops down to a new line, I hit <kbd>Enter</kbd> again and it enter the input and continues the program no problem but I'm wondering why. Here's a code snippet:</p>
  
  <pre><code>    cin.ignore();
      cout &lt;&lt; "Enter Student Major (ex. COSC): ";
      cin.getline(student.major, 6);
  
      for(int i = 0; i &lt; sizeof(student.major); i++)
          student.major[i] = toupper(student.major[i]);
  
      cin.clear();
      cin.ignore(numeric_limits&lt;streamsize&gt;::max(), '\n');
  </code></pre>
  
  <p>Any suggestions?</p>