int main()
{
string data ="134D00D00444";
string bb = mytest::Replace(data,"D","E");
cout<<bb<<endl;
getchar();
return 1;
}
string mytest::Replace(string ss,string s1,string s2)
{
int index = ss.find(s1);
if (index!=-1)
{
ss.replace(index,s1.length(),s2);
//return ss;
}
else if (index==-1)
{
return ss;
}
Replace(ss,s1,s2);
}
报错: