Archived

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

just a quick C++ question here...

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