I have created two arrays List1
and List2
with new
in C++. List1
is updated with data. I would like to copy List1
to List2
. I tried using
std::copy(std::begin(List1), std::end(List1), std::begin(List2));
However, this does not work and gives the following error message:
error: ‘begin’ is not a member of ‘std’
Any possible suggestions for this error? Or alternative ways to copy in C++?