标签:temp pre ring === string 不能 字符 char ace
string temp = "wfewfwfw\=====";
char cha1 = ‘\\‘;
temp = cha1;
printf("%s", temp); //程序会奔溃
const char* ch = temp.c_str();
cout << cha1 << endl;
replace_all(temp, "\\", "\\\\");
cout << temp << endl;
标签:temp pre ring === string 不能 字符 char ace
原文地址:http://blog.51cto.com/haidragon/2327056