title: Reading integer then rest of the line as a single string from input
body: <p>Suppose I'm trying to read from the following input.txt</p>
  <pre><code>6 Jonathan Kim Jr
  2 Suzie McDonalds
  4 Patty
  </code></pre>
  <p>... and I want to store the first integers from every line and the rest of the strings as a string variable. This is what I have tried:</p>
  <pre><code>int num;
  string name1, name2, name3;   
  while ( ins &gt;&gt; num &gt;&gt; name1 &gt;&gt; name2 &gt;&gt; name3 )
  {  
      // do things
  }
  </code></pre>
  <p>Unfortunately this won't work since line 2 and line 3 only has 2 and 1 strings in a respective order so the loop will terminate at the very first loop.</p>
  <p>Is there a way to store the rest of the strings after an integer in a <strong>single variable</strong>, including the white spaces? For example, string variable <code>name</code> would hold:</p>
  <pre><code>&quot;Jonathan Kim Jr&quot; // first loop
  &quot;Suzie M&quot;         // second loop
  &quot;Patty&quot;           // third loop
  </code></pre>
  <p>I thought about using getline to achieve this as well, but that would require me to isolate the integers from the string and I was hoping there's a better approach do this. Perhaps using a vector?</p>