Help with array maniipulation
bearophile
bearophileHUGS at lycos.com
Tue Feb 4 14:23:01 PST 2014
Ali Çehreli:
> Is that the C extension where the last array in a struct can
> have more elements than its size? That will be a problem in D.
Since V.2.065 D supports well variable-length structs. You have
to use ubyte[0] data, and then allocate a large enough memory for
the whole variable-length struct. Here I have written an usage
example:
http://rosettacode.org/wiki/Sokoban#Faster_Version
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list