#include #include "matrix.h" using namespace std; /* TO TEST: ok matrix(int rows = 0, int cols = 0); ok ~matrix() { delete[] element; } ok int rowss() const { return rows; } ok int columns() const { return cols; } ok int times(int i, int j, matrix& left, matrix& right) const;//If unused, write it in private T& operator()(int i, int j) const; matrix& operator=(const matrix& x); //matrix operator+() const; matrix operator+(const matrix& x) const; //matrix operator-() const; matrix operator-(const matrix& x) const; matrix operator*(const matrix& x) const; matrix& operator+=(const matrix& x); friend ostream& operator<<(const matrix& x); */ int main() { int l[] = { 1,2,3,4,5,6 }; matrix left(2, 3, l), right(3, 2, l); cout << "left: " << endl << left << endl; cout << "right: " << endl << right << endl; cout << "left(1, 1): " << left(1, 1) << endl; cout << "right(2, 1): " << right(2, 1) << endl << endl; int out[] = { 1,2,3,4 }; matrix tmp(2, 2, out); tmp = left * right; cout << "times: " << endl << tmp << endl; return 0; }