This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: filename from fstream object
- From: John Love-Jensen <eljay at adobe dot com>
- To: <bernd dot speiser at uni-tuebingen dot de>, <gcc-help at gcc dot gnu dot org>
- Date: Tue, 07 Jan 2003 11:05:06 -0600
- Subject: 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.