Hi,
i'm trying to write a simple matrix class. I want to a add a function that transpozes the matrix and returns the transpozed one.
CMatrix CMatrix::Transpose()
{
CMatrix mat;
int temp;
temp = m_ROW;
m_ROW = m_COL;
m_COL = temp;
(A) mat = new CMatrix( m_ROW, m_COL );
// etc.
return mat;
}
Compiler tells me that "operator =" function is unavailable.( For line labeled with (A) )
Do i have to define functions for all operators?
And also what is a "copy constructor"? VC++ complains about lacking one of them.
By the way, if you happen to know about a simple matrix class, would you please tell me where to find it.
Thanks a lot.
i'm trying to write a simple matrix class. I want to a add a function that transpozes the matrix and returns the transpozed one.
CMatrix CMatrix::Transpose()
{
CMatrix mat;
int temp;
temp = m_ROW;
m_ROW = m_COL;
m_COL = temp;
(A) mat = new CMatrix( m_ROW, m_COL );
// etc.
return mat;
}
Compiler tells me that "operator =" function is unavailable.( For line labeled with (A) )
Do i have to define functions for all operators?
And also what is a "copy constructor"? VC++ complains about lacking one of them.
By the way, if you happen to know about a simple matrix class, would you please tell me where to find it.
Thanks a lot.