I am trying to perform the following operation:
source = new int[10]; dest = new int[10]; std::copy( std::begin(source), std::end(source), std::begin(dest));
However, the compiler reports the following error.
copy.cpp:5434:14: error: 'begin' is not a member of 'std' copy.cpp:5434:44: error: 'end' is not a member of 'std' copy.cpp:5434:72: error: 'begin' is not a member of 'std'
I have included the required <iterator> header in the code. Can someone help me with this?
c ++ iterator std compiler-errors syntax-error
Sathish krishnan
source share