
Meryl Silverburgh wrote:
Hi,
I have a sorted int vector 'orgWidth'. I would like to save the save into a new int vector 'newWidth' if the value of the current element is 10% bigger than the previous one.
For example, orgWidth int vector : 300 366 729 769 781 1297 newWidth int vector: 300 366 729 1297
I know how to add the value to the newWidth vector using the if_then with boost. But my question is how can I update the value of the 'previousWidth' as I use for_each() algorithm.
I'm not sure if it's useful to you, but the boost::bind solution is to use a
helper function:
#include