Use std::string::c_str() rather than &s[0] where a const pointer is required.