Discussion: Copying void *?
Afficher un message
Vieux 22/02/2008, 02h59   #8
thomas
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Copying void *?


> Yeah the second one. The tree is always going to have a node_type of
> myClass (and the tree is templated). As part of that class, there is
> one attribute that I would like to be any type therefore one of the
> attributes is a void*- Hide quoted text -
>
> - Show quoted text -


For a container to hold different types, I think you can use a parent
class for your types.
So that creating a tree<parent> will hold any type derived from it.
  Réponse avec citation
 
Page generated in 0,04407 seconds with 9 queries