***** 标准库算法 std::replace(std::string.begin(),std::string.end(),"'","''"); 失败
我要替换一个字符串中所有的 ' 为 ''
#include <algrothm>
#include <string>
void main()
{
std::string str = "aa'bb'cc";
printf("source:%s\n",str.c_str());
std::replace(str.begin(),str.end(),"'","''");
printf("dect:%s\n",str.c_str());
}