Discussion: Tree driving me nuts!
Afficher un message
Vieux 18/02/2008, 04h07   #13
Jerry Coffin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Tree driving me nuts!

In article <fpam23$40i$1@aioe.org>, jkherciueh@gmx.net says...
> Jerry Coffin wrote:


[ ... ]

> > struct node {
> > std::vector<node> children;

>
> Do you mean std::vector<node*>?


Oops -- yes. Looking back at it, that may have been kind of a Freudian
slip; if you could put a vector<node> there, it would be kind of cool,
quite possibly relieving you of even more of the memory management, but
I was just thinking of removing the requirement for managing a dynamic
array.

--
Later,
Jerry.

The universe is a figment of its own imagination.
  Réponse avec citation
 
Page generated in 0,04645 seconds with 9 queries