Your call
replace(iterator, iterator, const char*, const char *)
does not match the
std::replace
template:
template<typename _FIter, typename _Tp>
void
replace(_FIter, _FIter, const _Tp&, const _Tp&);
_Tp
is
char
here because the
std::string
iterators are pointing to
char
.
So you must use
replace(s.begin(), s.end(), 'l', 'i');