grahamr (work)
February 27th, 2008, 10:21 AM
Is it possible to get the filename from a stream?
My class has access to a ofstream that another class creates but I need to create an ifstream that has access to that file also. To pass the filename to the class it would mean modifying half a dozen classes just to pass the filename. I was hoping I wouldn't have to do that, but can't see a way looking at the fstream header of initializing from another stream or retrieving the original filename.
G.
My class has access to a ofstream that another class creates but I need to create an ifstream that has access to that file also. To pass the filename to the class it would mean modifying half a dozen classes just to pass the filename. I was hoping I wouldn't have to do that, but can't see a way looking at the fstream header of initializing from another stream or retrieving the original filename.
G.