Greetings, I need help to resolve this problem...
I have a class like this:
class CRealMatrix
{
private:
double m_RealMat[MAX][MAX];
}
I want to overload the [] operator, so I can access the elements of m_RealMat[][] as l-values, applying the subscript operator directly to the object. For instance:
CRealMatrix m;
m[1][1] = 1.5;
Is it possible to overload the [] operator for multidimensional arrays? How it can be done?
Thanks a lot!
Ricardo.-
I have a class like this:
class CRealMatrix
{
private:
double m_RealMat[MAX][MAX];
}
I want to overload the [] operator, so I can access the elements of m_RealMat[][] as l-values, applying the subscript operator directly to the object. For instance:
CRealMatrix m;
m[1][1] = 1.5;
Is it possible to overload the [] operator for multidimensional arrays? How it can be done?
Thanks a lot!
Ricardo.-