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]

Re: filename from fstream object


Hi Bernd,

As I understand it, a ifstream's filename is metadata that isn't part of
what an ifstream contains.

I think you'll need to pass that in as a separate parameter.

--Eljay

C++ Complaint of the Week
  string foo("yada.txt");
  ifstream bar(foo); // Bzzzt.  Tilt.  Use foo.c_str() instead.
Why is the C++ library mostly ignorant of its own string objects?  Grrrr.


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