MyStruct[] is actually a struct similar to this: struct MyStruct[] { MyStruct* ptr; size_t length; }That struct is placed on the stack, but the data it points to, via the ptr field, is heap allocated.
What is struct? Just name and size?
Suliman via Digitalmars-d-learn Wed, 16 Aug 2017 05:56:11 -0700
MyStruct[] is actually a struct similar to this: struct MyStruct[] { MyStruct* ptr; size_t length; }That struct is placed on the stack, but the data it points to, via the ptr field, is heap allocated.
What is struct? Just name and size?