change std::for_each to std::transform
change std::for_each to std::transform

std::for_each  can't change the value of vector ,
Applies the given function object f to the result of dereferencing every iterator in the range [first, last), in order.
If InputIt is a mutable iterator, f may modify the elements of the range through the dereferenced iterator. If f returns a result, the result is ignored.
QiJunHu/learningRecord,QiJunHu/learningRecord