title: C++ while loop and getline issue
body: <p>I am having an issue with a while loop in a program I am creating.
  Basically it is suppose to ask the user for input until ctrl + D is entered (The entries will eventually be stored in an array, but I am just trying to check output before I start on that step)</p>
  
  <p>The issue is when i cout the variables the first line is missing.</p>
  
  <pre><code>int main()
  {
      string title;
      string url;
      string comment;
      double length = 0.0;
      int rating = 0;
      string sort_method;
  
      cin &gt;&gt; sort_method;
  
  while(getline(cin,title))
  {
          getline(cin, title);
          getline(cin, url);
          getline(cin, comment);
          cin &gt;&gt; length;
          cin &gt;&gt; rating;
          cin.ignore();
  
  }
      cout &lt;&lt; title &lt;&lt; endl;
      cout &lt;&lt; url &lt;&lt; endl;
      cout &lt;&lt; comment &lt;&lt; endl;
      cout &lt;&lt; length &lt;&lt; endl;
      cout &lt;&lt; rating &lt;&lt; endl;
  </code></pre>
  
  <p>I appreciate any help.</p>