struct VEC {
FLOAT x,y,z;
VEC() {};
VEC( FLOAT x, FLOAT y, FLOAT z );
};
VEC vec;
D3DXVECTOR3 vec2;
Structure Overloading
hey again
why do i get ??
[Linker error] undefined reference to `VEC::VEC(float, float, float)
here is my code
vec = VEC(0,0,0); // gives the linker error
vec2 = D3DXVECTOR3(0,0,0); // works gr8 and i tryed to copy there structure into // min but its still fails , what does MICROSOFT that i doesnt??
[/source]
Well, Microsoft actually implemented the constructor. You did not. ;)
VEC(float _x, float _y, float _z) : x(_x), y(_y), z(_z) {};
VEC(float _x, float _y, float _z) : x(_x), y(_y), z(_z) {};
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement