I have:
string filename: ifstream file(filename);
The compilers complains about no match between ifstream file and a string. Do I need to
The ifstream constructor expects a const char*, so you need to do ifstream file(filename.c_str()); to make it work.
ifstream
const char*
ifstream file(filename.c_str());