Advertisement
Bisus

Untitled

Aug 31st, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. // Конструктор с копированием
  2. Matrix=(const Matrix& other) :elem{new T[other.numRows*other.numColumns]}, numRows{other.numRows}, numColumns{other.numColumns}
  3. {
  4. for (int i = 0; i!=numRows; ++i)
  5. for (int j = 0; j!=numColumns; ++j)
  6. elem[i*numColumns + j] = other.elem[i*numColumns + j];
  7.  
  8. return *this;
  9.  
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement