Hi all,
I am leaning STL algorithm, especially on iterator.
I have two vector, src and data. I am going to search all elements with value more than 100 and replace the found elements with the one stored in data. I try the following code, it found the element but the replacement seems not working (it replace the element with some random number). Also I wonder if there is more compact way (like using STL algorithm) to do the same thing? I found replace_if but sees that if can only replace the elements with a constant value