On Wednesday, 16 April 2014 at 23:36:05 UTC, bearophile wrote:
Jeroen Bollen:

Is it possible to have a structure with a dynamic size?

See an usage example I have written here:
http://rosettacode.org/wiki/Sokoban#Faster_Version

But that code requires a very updated compiler. Otherwise you will need a little different code.

Bye,
bearophile

Just in case, the key line to pay attention to in that example is this one:

CellIndex[0] c_;

It is a commonly used C idiom for dynamically sized structures that D also supports.

Reply via email to