字符串替换,string的强大
#include"iostream"
#include"string"
using namespace std;
int main()
{
string str;
while(getline(cin,str))
{
string::size_type k;
while((k=str.find("you"))!=string::npos){
str.replace(k,3,"we");
}
cout<<str<<endl;
}
return 0;
}