Home
C++
Bitset
Class
Console
Data Structure
Data Type
Deque
Development
File
Function
Generic
Language
List
Map Multimap
Overload
Pointer
Qt
Queue Stack
Set Multiset
STL Algorithms Binary search
STL Algorithms Heap
STL Algorithms Helper
STL Algorithms Iterator
STL Algorithms Merge
STL Algorithms Min Max
STL Algorithms Modifying sequence operations
STL Algorithms Non modifying sequence operations
STL Algorithms Sorting
STL Basics
String
Valarray
Vector
replace « STL Algorithms Modifying sequence operations « C++
C++
STL Algorithms Modifying sequence operations
replace
1.
Use the generic replace algorithm to replace all occurrences of R by S
2.
Use std::replace to replace elements in vector by value
3.
Use replace to replace all elements with value 6 with 42
4.
Use replace to replace all elements with value less than 5 with 0