From: klaas.holwerda <ng...@kl...> - 2008-10-25 11:54:52
|
John Labenski wrote: > I think the latter makes more sense since you're writing that the == > operator should be applied between the class object instance and "b". > I've never understood why operators are often written outside the > class. > It is for cases like this, where the first argument is not a matrix. friend bool operator== ( double a, const a2dAffineMatrix& b ); But i think i don't use that type, so i switch to the short notation. Still what you made for the two argument case, was really close to a solution. Just changing it too this in the line giving the error in C++ bool returns = *a == *b; made it work, rest could stay the same. > ----------------- > > -John > > ps. I am adding the [] operator as op_index() if you need to use that. > Oke thanks, Klaas |