This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

filename from fstream object


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
=======================================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]