Jump to content
  • Advertisement
Sign in to follow this  

Structure Overloading

This topic is 4869 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hey again why do i get ?? [Linker error] undefined reference to `VEC::VEC(float, float, float) here is my code
struct VEC   {
   FLOAT x,y,z;   
   VEC() {};
   VEC( FLOAT x, FLOAT y, FLOAT z );

VEC vec;

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]

Share this post

Link to post
Share on other sites
Well, Microsoft actually implemented the constructor. You did not. ;)

VEC(float _x, float _y, float _z) : x(_x), y(_y), z(_z) {};

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!