Operator Overloading

  • + 0 comments

    class Matrix{ public: vector> a; Matrix(int n = 0, int m = 0) { a.resize(n, vector(m)); } Matrix operator+(Matrix const& obj){

    int n=a.size(); int m=a[0].size(); Matrix res(n,m); for(int i=0;i