title: How do I get an input file to read into a string array in C++?
body: <p>For some reason the full lines from my input file are not reading into the array, only the first word in each line. I am currently using the getline call, but I am not sure why it is not working. Here is the what I have for the call to populate the array. The txt file is a list of songs.</p>
  
  <pre><code>const int numTracks = 25;
  string tracks[numTracks];
  int count = 0, results;
  string track, END;
  
  cout &lt;&lt; "Reading SetList.txt into array" &lt;&lt; endl;
  
  ifstream inputFile;
  inputFile.open("SetList.txt");
  while (count &lt; numTracks &amp;&amp; inputFile &gt;&gt; tracks[count])
  {
      count++;
      getline(inputFile, track);
  }
  inputFile.close();
  </code></pre>