Assuming iv is a vector of ints, what is wrong with the following program? How might you correct the problem(s)?
vector::iterator iter = iv.begin(), mid = iv.begin() + iv.size()/2;while (iter != mid) if (*iter == some_val) iv.insert(iter, 2 * some_val);
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.