bind2nd 函数要用到头文件functional
#include <functional>
string response = "aaa\r\nbbb\r\n";
string::iterator new_end = remove_if(response.begin(), response.end(), bind2nd(equal_to<char>(), '\r'));
response.erase(new_end, response.end());
bind2nd 函数要用到头文件functional
#include <functional>
string response = "aaa\r\nbbb\r\n";
string::iterator new_end = remove_if(response.begin(), response.end(), bind2nd(equal_to<char>(), '\r'));
response.erase(new_end, response.end());