replace_copy_if « STL Algorithms Modifying sequence operations « C++






1.std::replace_copy_if with predicate
2.Use replace_copy_if to print all elements with a value less than 5 replaced with 42
3.Use replace_copy_if to print each element while each odd element is replaced with 0