Re: a+b+c is not equal to a+(b+c)

From: Adrian (nntp_at_bluedreamer.com)
Date: 10/26/04


Date: Tue, 26 Oct 2004 07:47:00 +0000 (UTC)

Gunnar G wrote:
> Why would that be better? I thought the result would be the same? That is,
> operator+(a,b) is the same as a+b.
Becuase that way you can write
1. a+5
2. 5+a
3. a+b

If operator+ is a friend a Bigint will automatically be constructed for
1 and 2 if needed. As a member function option 2 isn't possible

Adrian