If I have this main:
{
Matrix m1(3,3), m2(3,6), m3;
Matrix m4(2,3);
m1 = m1 + m2;
m1.print();
m3 = m1 * m2;
m3.print();
}
then how do I need to adjust this implementation file to work with it!?(Right now I'm just trying to get the '+' '=' to work, then I'll move on to the '*'):
Matrix & Matrix::operator = (Matrix &m)
{
numCols = m.numCols;
numRows = m.numRows;
return m;
}
Matrix Matrix::operator+(Matrix & m)//m2
{
m.numCols += numCols;
m.numRows += numRows;
return m;
}