I'm trying to open a file (ifstream object), read from the file, then pass the ifstream object to a function where it will continue reading from the file. Along the way, I want to store the path of the file, and would like to know if there is a way to retrieve the path of the file from the ifstream object using public member functions. I didn't see any way to do this here, but I thought maybe someone here knows a trick to get around that (if it does, indeed, store the path).
I know I can always pass the path as another argument, but I would like to avoid doing so because it would mean I would have to change the scope of a class or two. Any ideas?