Exercise at end of Ch. 56 of "Programming in D"

johntp albertqaeda at yahoo.com
Mon Aug 15 01:47:43 UTC 2022


I'm using DMD64 D Compiler v2.100.0 on linux mint.

I kept getting an assertion error for my solution to the 
exercises at the end of Chapter 56 of "Programming in D", so I 
copied the author's solution and got the same thing.

The exercise is the very last one (exercise 3) about overriding
```d
toHash()
```
for the TriangleArea object.  The last couple of assertions fail 
for me.
```d
assert(area2 in areas);
assert(area[area2] == 1.25;
```

Is there an errata page for the book?  I looked on the book's 
page and couldn't find it.  I can post the entire thing if you 
want, but I didn't want to clutter the forum until I made sure I 
didn't overlook something.  Thanks in advance.


More information about the Digitalmars-d-learn mailing list