Im wondering if there is a way to skip a word when reading text in with fstream. I know that there is the seekg() and tell(g) functions, but they don't have the nice 'ignore all whitespace and just eat the next word' ability. Neither does .ignore() seem to. Right now Im just skipping words by cin'ing thm into a garbage variable...but I wonder if theres a better way?
I had rigged up a function using seekg to skip to the next white space...but my file has multiple spaces in a row sometimes and it would screw up there unless I called it for each white space. Im looking for a function that really works the same as just cin'ing the word into a garbage variable.