Standard C++ Library Class Reference

1 2 3 4 5 6 7 8 9 10
List after replace:
1 2 3 4 5 6 11 8 9 10
List after replace_if:
13 13 13 4 5 6 11 8 9 10
List using replace_copy to cout:
17 17 17 4 5 6 11 8 9 10
List with all elements output as 19s:
19 19 19 19 19 19 19 19 19 19
Warning
If your compiler does not support default template parameters, then you need to always supply
the Allocator template argument. For instance, you will need to write :
vector<int, allocator>
instead of :
vector<int>
See Also
replace_if, replace_copy, replace_copy_if