How can I map bytes to a matrix of structures?

teo teo.ubuntu at yahoo.com
Fri Sep 9 13:26:01 PDT 2011


On Fri, 09 Sep 2011 13:10:41 -0400, bearophile wrote:

> Timon Gehr:
> 
>> A simple reinterpret cast should do:
>> auto b=*(cast(DATA[2][2]*)a.ptr);
> 
> I think this is enough:
> auto b = cast(Data[2][2])a;
> 
> Bye,
> bearophile

That works. Thanks.


More information about the Digitalmars-d-learn mailing list