Code:
void make_identity_matrix(var* mat)
{
   int i,j; 
   for( i= 0 ; i< 4 ; i++ )
	for( j= 0 ; j< 4 ; j++ )
	{
		if(i==j)
		{
			*mat[i][j]=1;
		}
		else
		{
			*mat[i][j]=0;
		}
	}
}


compiler says "dimension of array error."
in
"*mat[i][j]=1;"
and
"*mat[i][j]=0;"

Whats wrong here?
Maybe because he is only passing a pointer to a single var in an array? (but (var** mat) doenst work too)

Last edited by Puppeteer; 11/16/09 03:09.

Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com