title: Parse a file in c++ and ignore some characters
body: <p>I'm trying to parse a file that has the following information</p>
  
  <pre><code>test_wall ; Comments!!
  je,5
  forward
  goto,1
  test_random;
  je,9
  </code></pre>
  
  <p>I'm supposed to ignore comments after the ";" and move on to the next line. When there is a comma I'm trying to ignore the comma and store the second value.</p>
  
  <pre><code>string c;
  int a;
  
  c=getChar();
  
  ifstream myfile (filename);
  if (myfile.is_open())
  {
     while ( c != ';' &amp;&amp; c != EOF)
     {
         c = getchar();
         if( c == ',')
         {
           a= getChar();
         }
  
     }
  }
  myfile.close();
  }
  </code></pre>