title: How to skip a string when reading a file line by line
body: <p>I have managed to skip the name section when reading values from a file with name and value pairs. But is there another way to skip the name section without declaring a dummy string to store the skipped data?</p>
  
  <p>Example text file: <a href="http://i.stack.imgur.com/94l1w.png" rel="nofollow">http://i.stack.imgur.com/94l1w.png</a></p>
  
  <pre><code>void loadConfigFile()
  {
      ifstream file(folder + "config.txt");
  
      while (!file.eof())
      {
          file &gt;&gt; skip;
  
          file &gt;&gt; screenMode;
          if (screenMode == "on")
              notFullScreen = 0;
          else if (screenMode == "off")
              notFullScreen = 1;
  
          file &gt;&gt; skip;
          file &gt;&gt; playerXPosMS;
  
          file &gt;&gt; skip;
          file &gt;&gt; playerYPosMS;
  
          file &gt;&gt; skip;
          file &gt;&gt; playerGForce;
      }
  
      file.close();
  }
  </code></pre>