operator to return values at a specified index.
Below is the member function
double operator()(int a , int b)
{
if((a < 1) || (b < 1) || ((a + 1) this->row) || ((b + 1) this-
>col)){
cerr << "Invalid index for Matrix" <<endl;
}
return this->data[(a-1)*this->col + (b-1)];
}
It is invoked
int row, col;
double d;
Matrix M;
d = M(row,col);
My question is thus, can I accomplish the reverse task of assigning a
double d to a Matrix M at power row,col ie.
M(row,col) = d;
Justin