So I want to create a tree with two different types of nodes, the internal nodes have pointers to further nodes, while the leaf nodes simply have elements. In Pascal, you can define a type with one element being a nodetype which can be defined to be either a leaf or an internal node. Then there is a case statement to decide what members are available for that node type. Is this possible in C++ classes or Structs, or something?