adding .c_str() to filenames in ifstream