Date: Thu, 14 Sep 2000 07:08:02 +0200 From: Egon Eckert To: djgpp AT delorie DOT com Subject: Re: Operator definitio in DJGPP Message-ID: <20000914070802.B7319@chance.cz> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0.1i In-Reply-To: ; from widder@chollian.net on Wed, Sep 13, 2000 at 09:52:17PM +0000 Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > --> color& operator+ (const color &,const color &); > --> color& operator+ (const color &); The latter (one argument) is what you have to use when the operator is a member of a class (color, I suppose). '* this' will be the 1st (= left) argument then. Use the former (two arguments) when the operator should not be a member of any class -- this is what you may freely choose. BTW I guess it would be more correct if you would return just 'color', not a reference, but I'm not sure. -- Egon Eckert, Chance, a.s. E-mail: egon AT chance DOT cz