Getting the Filename from a stream object
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
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
Popular Topics
Advertisement