C
Chris Theis
Hello,
as stated by the standard the fstream derivatives (ifstream & ofstream)
expect a const char*
parameter indicating the file name associated with the stream to be opened.
I wondered why there is no constructor accepting a const string& parameter,
which forces the user to convert any filename to an old C-style string
before passing it to the constructor. Is this simply a historical legacy or
is there some deeper problem, which I might fail to see. Probably somebody
could shed some light on this issue.
Thanks
Chris
as stated by the standard the fstream derivatives (ifstream & ofstream)
expect a const char*
parameter indicating the file name associated with the stream to be opened.
I wondered why there is no constructor accepting a const string& parameter,
which forces the user to convert any filename to an old C-style string
before passing it to the constructor. Is this simply a historical legacy or
is there some deeper problem, which I might fail to see. Probably somebody
could shed some light on this issue.
Thanks
Chris