#include#include // std::find #include using namespace std; string replace(string _str,const string& _findWord,const string& _replaceWord){ if (_str.empty()) return ""; else { int end_pos=_str.find(_findWord); while (end_pos!=-1) { _str = _str.replace(end_pos, _findWord.size(), _replaceWord); end_pos=_str.find(_findWord); } return _str; } } int main() { string v = replace("[i&&love&&c++&&]&&", "&&","#"); std::cout < [i#love#c++#]#



