Static Arrays in Structs/Classes and Dynamic Array Sizes

tsbockman via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jan 18 11:17:44 PST 2016


On Monday, 18 January 2016 at 15:15:46 UTC, Dennis Croft wrote:
> I'm trying to organize a large amount of simple data into 
> manageable parcels of information that I can access 
> efficiently. What I want to do is bake a static array into a 
> class but be allowed to do the banking at runtime (because I 
> want each array to be a different fixed length). Barring that, 
> I'd like a way to fix the size of a dynamic array so that it's 
> exactly the size I want and no larger behind the scenes.
>
> Anyone know enough about how these things work in D to help me 
> out?

Your description is too abstract for me. Can you give a simple 
code example illustrating what you're trying to do?

It doesn't need to actually compile; just write it how you want 
it to work and I'll see if I can translate it into valid D for 
you.


More information about the Digitalmars-d-learn mailing list