VC 替换字符串,替换字符

string a="d:\\abc\\dd.avi";
string::size_type pos = 0;    

while ((pos = a.find_first_of("\\",pos)) != string :: npos)
{
a.replace(pos,1,"//");
pos++;
}

你可能感兴趣的:(VC 替换字符串,替换字符)