how to initialize vector inside another vector in c++ code example Example: initialize a vector with another vector c++ complexity vector<int> vect2(vect1.begin(), vect1.end());