cvs.gedasymbols.org/archives/browse.cgi | search |
From: | Michael Bukin <bukinm AT inp DOT nsk DOT su> |
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: | <m3vi1ltfx8.fsf@H-Bukin.inp.nsk.su> |
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 |
Jeff Weeks <pweeks AT execulink DOT com> 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.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |