As you can see, your first 2 functions declare the same function. This would be similar to:
void g(float p[3]) { }
vs
void g(float *p) { }
You can call either of these function (assuming only one is declared and defined) like this:
float pos[3] {1.3f, 4.3f, 5.3f};
g(pos);
Thus if you want to call your functions as declared, you would have to do it like this:
float *arrayOfPointers[3] = { &pos[0], &pos[1], &pos[2] };
f(arrayOfPointers);
On the other hand, if you want to call the function as in your code, then you need to modify the declaration like this:
void f(float (*p)[3]) { }
That way, you declare a pointer to an array. You might want to use a typedef instead.
By the way, if you use that declaration, the array size must match as it will be part of the declaration.
At that point,you can also remarks that your original error message show you the syntax of a pointer to an array of 3 floats...
Bonus
In C++, you can also use references. I prefer that as we don't need to take the address of the array at the calling site and it will also allows you to ensure that only array of 3 items can be passed to the function.
void h(float (&p)[3]) { }
h(pos);
Update
An array of pointer would be:
float f1 = 1.1f, f2 = 2.2f, f3 = 3.3f;
float *arrayOfPointers[] = { &f1, &f2, &f3 };
The memory representation would look like:
[ &f1 | &f2 | &f3 ]
Since an array is equivalent to a pointer, then
float **
would declare a pointer to the first item which is a pointer to a
float
.
A pointer to an array of float would be:
float arrayOfFloats[] = { 1.11f, 2.22f, 3.33f };
float (*pointerToAnArrayOfFloats)[] = &arrayOfFloats;
The memory representation would look like:
& [ f1 | f2 | f3 ]
Extra links
Are pointers and arrays equivalent in C? - Eli Bendersky's website[
^]
There is a nice graphical representation that would help you understand the difference.
C Pointer to Pointer, Pointer to Functions, Array of Pointers Explained with Examples[
^]