title: How way to move a file pointer to the next word in a text file?
body: <p>I have a program that requires that I start from word N, hash the next N+M words (concatenated and done through another function so the original pointer is not moved), and then increment the FILE pointer that is pointing at N to the <em>next</em> word. </p>
  
  <p>The only way I thought to do this was to increment the FILE pointer until a space is found, then increment further until we found the first character of the next word. This is necessary because the file I am reading may have multiple spaces between words which would not result in a matching string compared to a file that has the same word content but single spaces. </p>
  
  <p>This method would then require <code>ungetc()</code> because we we would have taken from the stream the first character of the next word. </p>
  
  <p>Any ideas on a different implementation or am I pretty well restricted to this method?</p>
  
  <pre><code>    while ( (c = fgetc(fileToHash) != ' ' )
          ;
      while( (c = fgetc(fileToHash)) == ' ')
          ;
      ungetc(c, fileToHash); 
  </code></pre>