title: How get cin to stop skipping?
body: <p>Sorry, I dont know how to ask this better, I'm a really novice programmer and I'm not looking for you to do my homework, but I want to understand why this keeps happening.    </p>
  
  <pre><code>int inputScores(string names [], double scores [])
  {
    int count = 0;  // counter variable for number of student records in array
    char again;     // To check if user has more data
    do
    {
      cout &lt;&lt; "Enter student's name: ";
      getline(cin, names[count]);
      cout &lt;&lt; "\nEnter student's score: ";
      cin &gt;&gt; scores[count];
      count++;
      cout &lt;&lt; "\nDo you have more student records to enter?(Y/N): ";
      cin &gt;&gt; again;
  
    }while(again == 'y' || again == 'Y');
  </code></pre>
  
  <p>when I run this code and call the function this keeps happening and I dont know how to fix it:</p>
  
  <p>Enter student's name: <strong>Arthur</strong></p>
  
  <p>Enter student's score: <strong>100</strong></p>
  
  <p>Do you have more student records to enter?(Y/N): <strong>y</strong>
  <br>Enter student's name: 
  <br>Enter student's score:</p>
  
  <p>it skips the "enter student's name question" (doesnt let me type anything) and goes straight to the next question.</p>