Difficulty copying multi dimensional static array to dynamic array.
Derek Parnell
derek at psych.ward
Mon Feb 25 12:51:12 PST 2008
On Mon, 25 Feb 2008 15:13:45 +0000, Spacen Jasset wrote:
> All I am trying to do is 'return' an array so that toFloatArray4x4() can
> be called to fill in a static array.
Because for some mysterious reason, one can't pass the static array by
reference you probably need to do it the old fashioned way ...
void fillArray(float *d, int len)
{
while (len > 0)
{
*data = somevalue;
data++;
len--;
}
}
float[4][4] m1;
fillArrary( &m1[0][0], 4 * 4 );
--
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell
More information about the Digitalmars-d-learn
mailing list