On inheritance and polymorphism in cats and dogs (and other beasts too)

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Dec 21 07:08:26 PST 2014


On Sunday, 21 December 2014 at 15:05:47 UTC, Mike Parker wrote:

>
>       // Now do Catty things
>       pickiness = (mother.pickiness + father.pickiness) / 2;
> 

Sorry, forgot to change that line when I copy-pasted. Should be:

pickiness = (catmom.pickiness + catdad.pickiness) / 2;


More information about the Digitalmars-d-learn mailing list