March 29th, 2010, 09:11 AM
Re: matrix multiplication
Your copy constructor and copy assignment operator should have the parameter as const Matrix&. After all, it should make sense to copy a matrix that is constant.
I notice that the copy assignment operator copies the row count and column count, i.e., the number of rows and columns of the source matrix could differ from the destination matrix. However, it makes no attempt to allocate space if the source matrix has more rows or columns than the destination matrix.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.