matrix.hppclass Matrix
{
public:
Matrix(int rows, int columns, const double* elems);
~Matrix();
Matrix* operator*(Matrix& matrix);
double det();
Matrix* invert();
Matrix* transpose();
};
matrix.cppMatrix* Matrix::operator*(Matrix& matrix)
{
//
}
main.cppint main(int argc, char** argv)
{
double d[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0};
Matrix* m = new Matrix(3, 3, d);
Matrix* m1 = new Matrix(3, 3, d);
Matrix* m2 = m * m1;
return EXIT_SUCCESS;
}
Текст ошибки:
main.cpp:16:5: error: invalid operands of types ‘Matrix*’ and ‘Matrix*’ to binary ‘operator*’
m * m1;
Спасибо.