rawRead using a struct with variable leght
Era Scarecrow via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jun 5 09:30:53 PDT 2017
On Monday, 5 June 2017 at 16:04:28 UTC, ade90036 wrote:
> Unfortunately the struct doesn't know at compile time what the
> size of the constant_pool array, or at-least was not able to
> specify it dynamically.
It also won't know ahead of time how many fields, methods or
attributes you have either.
First I'd say all the arrays will have to be redefined to use
[], rather than a fixed size.
Glancing at the chapter information, you're probably not going
to have an easy time, and will have to simply have to fill in the
fields individually in order followed by allocating the arrays
and probably filling/loading those immediately (although it's
possible the array contents are done at the end, though it seems
doubtful).
More information about the Digitalmars-d-learn
mailing list