I'm trying to create a class of nodes, where each node would contain a
list of other nodes. Ideally I would like it to work like this:
class node {
list<node> children;
};
However MS Development Environment 2002 V7.0 / MS .NET Framework V1.0
will not handle this class (g++ does). The following works but I must
explicitly dereference the pointers twice (and once implicity for the
reference???) in order to access anything with a list<node
*>::iterator.
class node {
list<node*> children;
};
Is there a simple way of getting this to work with less dereferences
to access a list item via an iterator and of course no copying of the
node class.
- JKL