Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!hubcap!grimlok From: grimlok@hubcap.clemson.edu (Mike Percy) Newsgroups: comp.lang.c++ Subject: friend operator +(l,r) vs. operator +(r) Message-ID: <11759@hubcap.clemson.edu> Date: 20 Nov 90 21:24:35 GMT Organization: Clemson University, Clemson, SC Lines: 28 I've tried and tried to get a handle on this question from various sources, but haven't been enlightened... What semantic/operational and/or stylistic differences are there between these two definitions? class foo { ... public: foo& operator +(foo& rhs); } and class foo { ... public: friend foo& operator +(foo& lhs, foo&rhs); } I must be missing something, because to me these effectively are the same thing, but the first can operate on this. "I don't know about your brain, but mine is really...bossy." Mike Percy grimlok@hubcap.clemson.edu ISD, Clemson University mspercy@clemson.BITNET (803)656-3780 mspercy@clemson.clemson.edu