idiomatic D: what to use instead of pointers in constructing a tree data structure?
Laeeth Isharc via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Jan 7 07:02:32 PST 2015
Not true. If you're using a tree structure, you *should* use
> pointers.
> Unless you're using classes, which are by-reference, in which
> case you
> can just use the class as-is. :-)
Thanks v much.
I just came to that realization also when I stepped away.
class node
{
string name;
node ref;
}
what's wrong with the code above ? i get an error no identifier
for declarator node. (I have not used classes much, since
structs often seem to be enough for what I need to do mostly).
More information about the Digitalmars-d-learn
mailing list