hello i really need help, my code is a class matrix that should a matrix multiplication .i am not familiar with classes .When ever i run the code an error with come up at the private function.
cat(int r, int c) {row = r; col = c; data = new int [row*col];}
cat(cat &a ) { row=a.row; col = a.col; data = new int [row*col];
cat operator*(const cat& b);
for (int i=0; i< row*col; i++) data[i]=a.data[i];
}
~cat()
{
if (data !=0) delete [] data;
}
void showMatrix()
{
int w=0, j;
for (int i = 0; i<row; i++)
{
for (j=0; j<col; j++)
{
cout<<data[w] << ' '; w++;
}
cout<<endl;
}
cout <<endl;
}
};
cat product(cat &a, cat &b)
{
cat tmp( a.row, b.col);
int s, i, j;
for (i=0; i<a.row; i++)
for (j=0; j<b.col; j++)
for (tmp.data[i*b.col+j] = 0, s=0; s<a.col; s++)