title: Four variable file I/O C++ into hash table for processing
body: <p>I have a problem with C++ File input.
  I have a file with <strong>n</strong> lines that each lines contains 4 variables. I need them read them into a hash table that I created. My problem is that I can't read the file correct way.
  For example here the input file variables:</p>
  
  <pre><code>line id cont uniq-number Band
     0 10  B   02020213456 DaftPunk
     1 11  A   02030213456 Dazy
      and so on..
  </code></pre>
  
  <p>The main problem is to read each variable in line until file EOF.
  So I need read in each line these variables id, cout, uniq-number and band and while it is reading put these data inside a hash table to process them even further in C++.
  Example</p>
  
  <pre><code>cout &lt;&lt; "File" &lt;&lt; endl;
  int date,id;
  string group,line,ch;
  datar d;
  hasher h1;
  ifstream inFile;
  inFile.open("file.txt");
  while (getline (inFile,line))
  {
   // "reads" file each variable   
   inFile &gt;&gt; id &gt;&gt; ch &gt;&gt; date &gt;&gt; group;
   //add these variable in line one to first hash line
   d.id = id;
   d.data = ch;
   d.date= date;
   d.group = group;
   h1.add(d);
  //must repeat until file EOF for each line
  }
  inFile.close();
  </code></pre>