title: Can't get pointer back to zero
body: <p>I can't get the pointer back to zero so i can go through the data again after the echo. </p>
  
  <pre class="lang-c prettyprint-override"><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;string&gt;
  #include &lt;iomanip&gt;
  
  using namespace std;
  
  int main()
  
  {
      ifstream infile;
  
      infile.open ("scores.txt" , ifstream::in);
  
      int ch = infile.get();
      string lastname;
      char gender= ' ';
      string collegetype;
      float score=0;
      float scoreMALE=0;
      float scoreFEMALE=0;
      int countMALE=0;
      int countFEMALE=0;
  
      while ( !infile.eof())
      {
  
            cout &lt;&lt; (char) ch;
             ch = infile.get();
      }
  
      infile.seekg(0,ios::beg);
      while ( !infile.eof())
      {
      infile&gt;&gt;lastname&gt;&gt;gender&gt;&gt;collegetype&gt;&gt;score;
      if(gender == 'm')
            {
                  scoreMALE = scoreMALE + score;
                       countMALE++;   
            }         
  
      else if (gender == 'f')
            {
                    scoreFEMALE = score;
                    countFEMALE++;
            }
      }
  
    cout&lt;&lt;"\n\n\n The total Female Scores is"&lt;&lt;countFEMALE&lt;&lt;"\n\n\n The total of the male scores is"&lt;&lt;countMALE; // Checking to see if file works
  
  
    infile.close();
  
    cout&lt;&lt;"Press &lt;Enter&gt; to Exit";
     cin.ignore();
     cin.get();      
     return 0;                   
  }
  </code></pre>
  
  <p>here's the input file:</p>
  
  <p>Bailey           M CC 68
  Harrison         F CC 71
  Grant            M UN 75
  Peterson         F UN 69
  Hsu              M UN 79
  Bowles           M CC 75
  Anderson         F UN 64
  Nguyen           F CC 68
  Sharp            F CC 75
  Jones            M UN 75
  McMillan         F UN 80
  Gabriel          F UN 62       </p>