I am a bit confuse here how to begin coding.

Hi Guys . I am new in C++ programming . I have taken c++ subject and my lecture ask me to solve integer matrix as show below . all I am asking to give me some hint or explanation on that .Really appreciate your help.

class MAT
{
int *const e ;
const int r,c;

public :
MAT (int r , int c);
MAT (const MAT &a);
virtual ~MAT();
virtual int *const operator[](int r);
virtual MAT operator+(const MAT& a)const;
virtual MAT operator-(const MAT& a)const;
virtual MAT operator*(const MAT& a)const;
virtual MAT operator~()const;
virtual MAT operator=(const MAT &a);
virtual MAT operator+=(const MAT &a);
virtual MAT operator-=(const MAT &a);
virtual MAT operator*=(const MAT &a);
virtual void print()const;
};
}
int main()
{
MAT a(1,2),(2,2),(1,2);
a[0][0]=1;
a.print();
c=a*b;
c.print();
}
Was all that code imposed on you or did you write it all yourself?
Topic archived. No new replies allowed.