Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Matrix(const Matrix &other) {
- rows = other.rows;
- columns = other.columns;
- data = new T * [rows];
- for (size_t i = 0; i < rows; ++i) {
- for (size_t j = 0; j < columns; ++j) {
- data[i][j] = other.data[i][j];
- }
- }
- }
- Matrix& operator= (const Matrix& other) {
- rows = other.rows;
- columns = other.columns;
- data = new T * [rows];
- for (size_t i = 0; i < rows; ++i) {
- for (size_t j = 0; j < columns; ++j) {
- data[i][j] = other.data[i][j];
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement