Exercise at end of Ch. 56 of "Programming in D"
johntp
albertqaeda at yahoo.com
Mon Aug 15 03:25:14 UTC 2022
On Monday, 15 August 2022 at 02:59:59 UTC, Ali Çehreli wrote:
> On 8/14/22 19:23, Ali Çehreli wrote:
> class Point {
> int x;
> int y;
> Color color;
>
> // ...
>
> override size_t toHash() const {
> return x + y;
I just saw this second reply. Might not be good if you have
Point(1,2) and Point(2,1) because they would hash the same.
More information about the Digitalmars-d-learn
mailing list