title: Problem reading a tab delimited file in C++
body: <p>Right now I am trying to read in a list of books that have tab separated information and just printing the title. Eventually I will add each piece of info to a vector with their names. When I switched the delimiter to a tab from nothing or a one character space, suddenly nothing was outputted.I've look over stack exchange, but most of these solutions aren't telling me why mine doesn't work.
  Here is my code</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;iomanip&gt;
  #include &lt;string&gt;
  #include &lt;cstdlib&gt;
  using namespace std;
  
  int main() {
  ifstream DataFile;
  string str;
  string title;
  string author;
  string publisher;
  string date;
  string ficornon;
  
  if(!DataFile)
  {
      cout&lt;&lt;"error";
  
  }
  DataFile.open("/Users/Kibitz/Desktop/bestsellers.txt",ios::in);
  getline(DataFile,title);
  while(!DataFile.eof()) // To get you all the lines.
  {
  
      cout&lt;&lt;title&lt;&lt;endl;
      getline(DataFile,author);
      getline(DataFile,publisher);
      getline(DataFile,date);
      getline(DataFile,ficornon);
      getline(DataFile,title);
  }
  DataFile.close();
  return 0;
  </code></pre>
  
  <p>}</p>
  
  <p>First two lines of input file:</p>
  
  <pre><code>1876    Gore Vidal    Random House    4/11/1976    Fiction
  23337    Stephen King    Scribner    11/27/2011    Fiction
  </code></pre>