You are viewing a single comment's thread. Return to all 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
Seems like cookies are disabled on this browser, please enable them to open this website
Operator Overloading
You are viewing a single comment's thread. Return to all 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