class matrix
{
int r,c;
public:
matrix(int r , int c)
{
this->r=r;
this->c=c;
}
};
I have this class named as matrix
. Where I need to create a matrix by taking the size of the row and column and then overload []
in such a way that when used with ob ( object of the matrix class)
like ob[i][j]
to interchange the row and column of the matrix. (i
size of column and j
size of row)
How can I do the task?