title: c++ how do you store a full string into a string array using getline?
body: <p>After it gets the first string and first double the program doesn't get the other strings.</p>
  
  <pre><code>for (int i = 0; i&lt; NUM_MOVIES; i++)
  {
      cout &lt;&lt; "Enter the name of the movie: ";
      getline(cin, names[i]);
  
      cout &lt;&lt; "How much did " &lt;&lt; names[i] &lt;&lt; " earn &lt;in millions&gt;: ";
      cin &gt;&gt; earnings[i];
      cout &lt;&lt; endl;
  }
  </code></pre>