Firstly, because you are switching to C++, vector is recommended to be used instead of traditional array.
Besides, to copy an array or vector, std::copy
is the best choice for you.
Visit this page to get how to use copy function: http://en.cppreference.com/w/cpp/algorithm/copy
Example:
std::vector<int> source_vector;
source_vector.push_back(1);
source_vector.push_back(2);
source_vector.push_back(3);
std::vector<int> dest_vector(source_vector.size());
std::copy(source_vector.begin(), source_vector.end(), dest_vector.begin());