Original Post
Looking for a little help with D3DXVECTOR2 pointers.
Say I write a simple function that takes a D3DXVECTOR2 structure and fills it out, obviously the D3DXVECTOR2 parameter has to be passed in as a reference. Something like this...
void ( D3DXVECTOR2 *position )
{
*position.x = 320;
*position.y = 240;
}
When I try and get this the compiler gives me an error.
: error C2228: left of ''.x'' must have class/struct/union type
: error C2228: left of ''.y'' must have class/struct/union type
So what is the proper way to do this?
Any help much appreciated, thanks.