How to get current position in file using C++?

Question

How to get current position in file using C++?

Re: How to get current position in file using C++?

tellg() and tellp()
These two member functions have no parameters and return a value of the member type pos_type, which is an integer data type representing the current position of the get stream pointer (in the case of tellg) or the put stream pointer (in the case of tellp).