You are viewing a single comment's thread. Return to all comments →
here is my Matrix class
class Matrix { public: vector<vector<int>> a; Matrix& operator+(const Matrix& m) { int row = 0; int col = 0; for(auto& a_row: a){ col = 0; for(auto& data: a_row){ data += m.a[row][col]; col++; } row++; } return *this; } };
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 →
here is my Matrix class