Mix struct types in the same array

tirithen tirithen at gmail.com
Thu Dec 19 18:01:40 UTC 2019

On Thursday, 19 December 2019 at 00:00:56 UTC, Paul Backus wrote:
> If all of the structs need to implement a particular method (or 
> set of methods), you can use an interface and a templated 
> adapter class to give them a common type. Here's a simple 
> example:
Thank you for the example that looks like a wonderful example, 
I'll try it out. I like that the structs then can be declared 
when the array is constructed.

More information about the Digitalmars-d-learn mailing list