there is no constructor for ifstream ofstream with const std::string& by default (only C strings).

http://www.cplusplus.com/reference/fstream/ofstream/ofstream/