look at this code

it's about the multilplication of two matrices m*n and n*p

for(i=0;i<m;i++)

for(j=0;j<p;j++)

sum=0;

for(k=0;k<n;k++)

sum=sum+*(*(m1+i)+k)*(*(*m2+k)+j)) /*multilplying by the use of pointers*/

*(*(m3+i)+j)=sum

compiler is giving error for the last two above code lines.In the last line i am trying to assign the value of sum to another matrix m3.

i will be very thankful for any help.