I am learning C++ from Primer 5th edition and I am at Returning a Pointer to an Array. The declaration of this function is:
int (*func(int i))[10];
int(*)[10] is a pointer to an array of 10 ints. int* is a pointer to int. These are different types.
int(*)[10]
int
int*
However, an array decays to a pointer to its first element, so you can do:
int a[10]; int(*p)[10] = &a; int* q = a; // decay of int[10] to int*
But not:
q = p; p = q;