我想使用"eof" std::replace**.**将缓冲区字符串从的值替换为。
std::string buffer = "eof";
std::replace(buffer.begin(), buffer.end(), std::string("eof"), std::string("\0"));编译器错误:
no match for ‘operator==’ (operand types are ‘char’ and ‘const std::__cxx11::basic_string<char>’)https://stackoverflow.com/questions/73082887
复制相似问题