• Notice regarding image hosts and attachments. See here.

Is this right?

Soldato
Joined
22 Oct 2005
Posts
2,912
Location
Moving...
I'm trying to do some matrix multiplication on 8x8 matrices in c++. I found this code to do it:

Code:
for( int j = 0; j < 8; j++ ) 
      for( int i = 0; i < 8; i++ )
	    for( int k = 0; k < 8; k++ )
	          C[i][j] += A[k][j] * B[i][k];

I'm getting frustrated because my program is working in parts and not in others (mainly where 0's and negative numbers are involved I think). Does this code look ok or is there something wrong?

Thanks.
 
Back
Top Bottom