Problem: Cannot create class out of nothing using witchcraft

Benjamin Thaut code at benjamin-thaut.de
Wed Oct 16 07:08:56 PDT 2013


Am 16.10.2013 10:40, schrieb DoctorCaptain:
>
> http://dpaste.dzfl.pl/07b20d75
>
> Note the use of typeof() to get the type of the elements at each index
> of members, to generate a type on which a constructor can be called to
> instantiate the elements at each index of members. Magic.

There is actually a easier way to instanciate the elements. Just do "new 
T[i]();" no need for typeof.


-- 
Kind Regards
Benjamin Thaut


More information about the Digitalmars-d-learn mailing list