The first splits into a pointer to the first element in the array, the second - the actual link to the array.
They differ from each other so that pointers and links are generally different.
In particular, in the case of arrays, an array reference is useful because you retain the ability to determine the size of the array. This frees you from having to pass the size / length of the array as a separate parameter, as in the C API.
One way to implement this, which I find particularly attractive, is through templates. Using the template parameter, you can force the compiler to automatically output the size of the array. For instance:
void ProcessArray(int* pArray, std::size length) { for (std::size_t i = 0; i < length; ++i) {
source share