If you need to remember your place in a stream, you can use the tellg() method to get the input position (for stream, istream and subclasses) in a stream you are reading; or tellp() to return the output position in a stream you are writing (stream, ostream, and subclasses.) The return value is a position relative to the beginning of the file (an exact offset in bytes for a file opened in binary mode, but this isn't guaranteed to be exact for text mode streams.)
Later, you can use the seekg() or seekp() method to restore the position, using the position returned byte tellg/tellp as an offset from the beginning of the file. For example, suppose infile is an ifstream object opened on a file. Then:
auto position = infile.tellg(); // saves the current input position
The g and p suffixes seem to be abbreviations for "get" (for reading) for and "put" (for writing).
Later, perhaps after reading from or closing and reopening the stream on the same file, you can use:
infile.seekg(position, inflie.beg); // get next input starting at (position) relative to the beginning of the file
The type of the returned position is std::streampos. It behaves a bit like an integer, in that you can add or subtract std::streamoff offset values to or from it. It's usually a bad idea to do arithmetic like that on text-mode streams, but that does let you compute read locations in a binary stream.
See:
tellg: http://www.cplusplus.com/reference/istream/istream/tellg/
seekg: http://www.cplusplus.com/reference/istream/istream/seekg/
...with examples of using seekg/tellg to find the length of a binary file and using that to read the whole file into memory.