I am trying to get a better hold on iterators and generic functions. I thought it would be a useful exercise to write a function that converts container1 < contain
container1 < contain
std::accumulate can do it for you. You need to gather up the contents of each of the inside vectors into the outside vector.
std::accumulate
vector> v_of_v; vector v = std::accumulate( v_of_v.begin(), v_of_v.end(), vector(), [](vector a, vector b) { a.insert(a.end(), b.begin(), b.end()); return a; });