The constructor for ifstream
used to only take a const char *
(which is what the c_str()
method provides.
I believe that there is a new constructor for it that takes a std::string
in the upcoming standard, (edit) see this answer.
It could also be specific to your implementation.