views:

89

answers:

0

Hello,

How to implement in c++ the operator() and operator* (multiplication) for this Matrix class?

class matrix {
static const int MAX_SIZE=100;

T operator()(int, r, int c) const;
matrix& operator*(const matrix& N) const;

private:
  int r_, n_;

  struct elem{
    T content;
    int row, col;
    elem* next_row;
    elem* next_col;
  };
     elem* f_[MAX_SIZE];
     elem* c_[MAX_SIZE];

};

representation: matrix

thanks for answers.