Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

_nuke_

just a quick C++ question here...

This topic is 6011 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

everybody that uses VB here knows of functions and so do the ppl that use C++ or any other programming lanuage. so here is some VB code... Public function DO_IT(x as integer, y as integer, z as integer) as D3DVECTOR DO_IT.x = x DO_IT.y = y DO_IT.z = z end function I know how to write a function in C++ so I am not that dumb but how do I make it return that D3DVECTOR data type thingy. thanx for your help... _nuke_ "I am the Alpha and the Omega, then again I am nuke"

Share this post


Link to post
Share on other sites
Advertisement
well for one you shouldent us Integer for vector values :p ( D3D uses singles )

in C++ its somthing like this
D3DVector Do_It(float x, y, z)
{
D3DVector Temp;
Temp.x=x;
Temp.y=y;
Temp.z=z;

return Temp;
};

-Ian

Share this post


Link to post
Share on other sites

  • 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!