摘要: replace把区间内所有old_value替换成new_valuereplace(first, last, old_value, new_value){ for(; first!=last; ++first) { if(*first == old_value) *first = new_value; }}replace_if提供一个仿函数判断两个元素是否相等replace_copy把替换后的内容复制到目的容器中replace_copy(first, last, result, old_value, new_value){ for(;... 阅读全文
posted @ 2012-04-28 14:18 w0w0 阅读(196) 评论(0) 推荐(0) 编辑