A pointer is not the same as a normal variable. A pointer points to something (variables). You can reference to the variable's value through that pointer.

A pointer contains the address of the variable it points to. While a variable contains the actual value.

So, your VECTOR * points to nothing, and thus yield "W1501 Empty pointer". You have to create a VECTOR struct and make the pointer points to that struct:
Code:
VECTOR v;
v.x = 5;
v.y = 2;
v.z = 1;

VECTOR *vp = &v; /* makes vp points to v */
<...>
vec_set(vp, ..);
vec_add(vp, ..);
<...>



Or, use the pointer directly:
Code:
VECTOR *vp = malloc(sizeof(VECTOR)); /* Allocates the memory needed for a VECTOR struct where vp will point to */
vec_set(vp, vector(5, 2, 1));



grin

Last edited by Florastamine; 04/21/15 13:06.