title: (c++) Reading numeric data in a column from a txt file and determining highest value
body: <p>So I'm trying to make a program that will read a txt file where time, voltage and ampere are stored, the text file looks like this <a href="http://pastebin.com/a0ZvYGmj" rel="nofollow">http://pastebin.com/a0ZvYGmj</a>, only ten times bigger (it's obnoxiously huge, so large that it didn't fit into a single pastebin).</p>
  
  <p>So what I have to do is write a program that will read through the entire voltage column and detect the highest value (second column), then display it and the time it occurs (first column). I can also do it with the ampere, but that's optional.</p>
  
  <p>Problem is I literally have no idea what to do, this is what I have managed to do so far</p>
  
  <pre><code>#include &lt;iostream&gt;  
  #include &lt;stdio.h&gt;
  using namespace std;
  int main()
  {
  FILE * pFile;
  char mystring [100];
  
  pFile = fopen ("voltage.txt" , "r");
  if (pFile == NULL) perror ("Error opening file");
  else {
    if ( fgets (mystring , 100 , pFile) != NULL )
     puts (mystring);
   fclose (pFile);
  }
  
   system ("PAUSE");
   return 0;
  }
  </code></pre>
  
  <p>But all that does is read the first entry of each of the 3 columns ("Time Volt Ampere"), so I probably have to start over.</p>
  
  <p>Can anyone send me in the right direction? How do I read an entire column, them make the program detect the biggest number in said column?</p>
  
  <p>I'm completely lost so any help would be appreciated.</p>