It looks like you have implemented the operator correctly, but you have forgotten to add a forward declaration for it to the header.
Add this line to your Matrix4X4.h
file to fix this problem:
Matrix4X4 operator * (Matrix4X4 & lhs, Matrix4X4 & rhs);
It needs to be added outside the class declaration, because it is a free-standing binary operator.
Note that you could improve your code by marking float getMember(int,int);
constant, and declaring lhs
and rhs
parameters const
references:
float getMember(int,int) const;
Matrix4X4 & operator = (const Matrix4X4 & rhs) // Make your assignment operator take a const
...
Matrix4X4 operator * (const Matrix4X4 &lhs, const Matrix4X4& rhs);