Pointer size: sizeof(myPointer)(equal sizeof(uint8_t*))
Pointer size: sizeof(*myPointer)(equal sizeof(uint8_t))
If you meant that this points to an array, there is no way to find out. The pointer simply points and does not care where the value is.
To pass an array using a pointer, you also need to pass the size:
void foo(uint8_t* pStart, size_t pCount);
uint8_t arr[10] = { };
foo(arr, 10);
, :
template <size_t N>
void foo(uint8_t (&pArray)[N])
{
foo(pArray, N);
}
uint8_t arr[10] = { };
foo(arr);