istream
Use these methods to control the current input position:
Method: streampos istream::tellg ()
Return the current read position, so that you can save it and return to
it later with istream::seekg
.
Method: istream& istream::seekg (streampos p)
Reset the input pointer (if the input device permits it) to p,
usually the result of an earlier call to istream::tellg
.
Method: istream& istream::seekg (streamoff offset, ios::seek_dir ref)
Reset the input pointer (if the input device permits it) to offset characters from the beginning of the input, the current position, or the end of input. Specify how to interpret offset with one of these values for the second argument:
ios::beg
ios::cur
ios::end