From: Michael Bukin Newsgroups: comp.os.msdos.djgpp Subject: Re: C++ class interaction and overloading (should be simple answer) Date: 05 Aug 1997 11:25:07 +0700 Organization: Budker Institute of Nuclear Physics Lines: 15 Sender: mike AT Home-51 DOT inp DOT nsk DOT su Message-ID: References: <33E3B107 DOT 63DEA07F AT execulink DOT com> NNTP-Posting-Host: h-bukin.inp.nsk.su To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Jeff Weeks writes: > I've got a C++ problem here. I've defined a two classes: Vector and > Matrix. I'd like to be able to do this: > > Vector2 = Vector1 * Matrix1 > > But I can't get that to work. Is this possible? > > class Vector { > inline friend Vector operator * (Matrix& mat, Vector& vect); Try: Vector2 = Matrix1 * Vector1; HTH.