You're trying to define local VECTOR*s. This does not work like this. By writing VECTOR* hareket_vektoru; you just create a pointer to a vector. You have to define VECTOR*s like this: VECTOR* hareket_vektoru = {x=0; y=0; z=0;} OUTSIDE your function. If it needs to be a local VECTOR*, VECTOR hareket_vektoru; (without *) should work.