filename from fstream object

Bernd Speiser bernd.speiser@uni-tuebingen.de
Tue Jan 7 16:42:00 GMT 2003


Hi, 
I'm creating an ifstream object successfully, I can open it and read from
the corresponding file.
Now I have the problem that the object (rather a reference to it) is given
to a routine, which wants to do some manipulations on the name of the file
associated with the ifstream. Really, it wants to open an ofstream object
who's name is somehow related to that of the ifstream-filename.
I checked several pieces of documentation, but could not find a solution
to the problem how to retrieve the file name from the ifstream object. Is
this at all possible? Ok, I could always give the filename string as another
parameter to my routine, but I would rather avoid this to keep the interface
clean.
Any help is appreciated, even negative answers, since in the latter case, I know
that I have to go to the unwanted alternative. Thanks.
Bernd

-- 
=======================================================================
Bernd Speiser
Institut f"ur Organische Chemie
Auf der Morgenstelle 18
D-72076 T"ubingen
Germany
phone: +49-7071-2976205 (office) +49-7071-2976242 (laboratory)
fax:   +49-7071-295518 (new!)
e-mail: bernd.speiser@uni-tuebingen.de
Internet: http://www.uni-tuebingen.de/speiser
=======================================================================



More information about the Gcc-help mailing list