• Advertisement
Sign in to follow this  

passing an array of floats?

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


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
Advertisement
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
Sign in to follow this  

  • Advertisement