Array of pointers

Philippe Sigaud philippe.sigaud at gmail.com
Mon Jan 20 13:49:07 PST 2014


On Mon, Jan 20, 2014 at 10:58 AM, Andrej Mitrovic
<andrej.mitrovich at gmail.com> wrote:
> On 1/16/14, Philippe Sigaud <philippe.sigaud at gmail.com> wrote:
>> The thing is, an array is a reference type
>
> Actually it's not, let's not confuse people with the terminology here.
> To recap for people new to arrays: an array in D is really just a
> struct, e.g.:

You're right, my bad.
TL;DR: you can do

```
struct Node
{
    T data;
    Node[] children;
}
```


More information about the Digitalmars-d-learn mailing list