Since you asked for a C++ solution…
#include <algorithm>
#include <iterator>
const int arr_size = 10;
some_type src[arr_size];
// ...
some_type dest[arr_size];
std::copy(std::begin(src), std::end(src), std::begin(dest));
More Related Contents:
- sizeof works unusual at c++ after array creation [duplicate]
- Why is sizeof giving incorrect number of bytes in C++?
- How do I compare chars (or strings) using void functions, also comparing chars that were taken from a struct array
- C++ – Find numbers between first and last negative numbers in Array
- If statement – C++
- Accessing an array out of bounds gives no error, why?
- Passing a 2D array to a C++ function
- How to convert vector to array
- Is std::vector so much slower than plain arrays?
- Why does cout print char arrays differently from other arrays?
- Address of an array
- Why does pointer decay take priority over a deduced template?
- Sort a 2D array in C++ using built in functions(or any other method)?
- How to initialize std::array elegantly if T is not default constructible?
- May I take the address of the one-past-the-end element of an array? [duplicate]
- How to initialize a vector in C++ [duplicate]
- Array with size 0 [duplicate]
- Difference between [square brackets] and *asterisk
- How are C++ array members handled in copy control functions?
- Remove an array element and shift the remaining ones
- How to initialize 3D array in C++
- How can I use an array as map value?
- C++ : Creating an array with a size entered by the user
- Pass arrays from C/C++ to Fortran and return a calculated array
- How to return array from C++ function to Python using ctypes
- array of pointers as function parameter
- Function returning array but main showing garbage [duplicate]
- Parse string containing numbers into integer array
- difference between pointer to an array and pointer to the first element of an array
- int *array = new int[n]; what is this function actually doing?