Getting the Filename from a stream object

Started by
0 comments, last by Drazgal 21 years, 10 months ago
Is there anyway to get the filename from an ifstream or ofstream object that has already opened a file? For example ofstream streamout("FileToBeOpened"); Is there anyway to get "FileToBeOpened" from streamout, after I have written that line? I do''t think there is (after alot of searching) but I want to make sure as it would be really helpful. Thanks. Ballistic Programs
Advertisement
Sadly there isn''t. You could write an wrapper which holds a fstream object and stores the filename. (an experimental idea when I have the time)

This topic is closed to new replies.

Advertisement