The program is supposed to read the number of vowels and the number of consonants in an external file (".txt") which it does, but I need to be able to "rewind"/go back to the start of the file, and I found a way to do this but am not sure how to check it?
Because sentence still equals the last line. You moved the pointer (seekg) back to the beginning, but printed out the last line again. You need to read from the file (inf) to prove that you're back at the beginning, not use data already stored in a variable.
c += sentence.length();
//sentence contains the last sentence in file (Fallen cold and dead)
cout << sentence << endl; //sentence is still containing the last sentence
You should put getline (inf,sentence); after rewind and before cout << sentence << endl;