Sign in to follow this  
thedodgeruk

passing an array of floats?

Recommended Posts


im using a univerity game engine, and this is how you get a matrix

float matrix[4][4];
box->GetMatrix( &matrix[0][0] );



i tryed to make my own funtion like


float desintaion[4][4];
CopyMatrix (&destination, &original)
{

original->GetMatrix( &destination[0][0] );
}


but nothing i do seams to work ,,, what im a doing wrong

Share this post


Link to post
Share on other sites
First of all, run your posts through a spellchecker to avoid mistakes like funtion, tryed, desintaion etc.

Now, your function is missing a return type and parameters. Also you seem to be mistaking & as in "address-of" and & as "reference". Try this:

[source=cpp]
void CopyMatrix (float* destination, float* original)
{
original->GetMatrix( &destination[0][0] );
}



Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this