   expose variables to the outside
  Hi,So I have this situation where I have a preset of core 'entities' if you would say so, that has a bunch of functionality.A simple way I wanted to create variations of these, was to register variables in a sort of a container, that knows how to load these from an outside file, an xml in this case, the variables can be of any kind, and any amount of variables can be stored.How can I go about to do this, a list of void pointers?int variable = 5;attributeContainer->registerAttribute(&variable, "variable", TYPE_INTEGER);am I doing this right?   
  void* and C++ are a bad combination, there are almost always better, safer ways.So let me get this straight before we explore solutions: you have an entity that is composed of arbitrary values, and you want to read those variables from an XML data file and then be able to access them in some fashion in code? Does that seem reasonable?What is the higher level purpose of this system? In what context is it used in your game, for example?;  I made a very crude entity style system, where I have a list of classes that all derive from a base class, so its basicly a tree of different inherited classes,I want to be able to have a selection of variables from each class easily exposed so I can create different variations from xml files, that contains a template for every kind of object, a list of attributes so to say, arbitry.the reason I want it this way is so that I can, without much trouble, add new child entites to the structure without having to work too much with expose the new variables to the xml files.thanks for the quick response btw.   ;  The variables themselves in the classes are already defined and used, but I want to be able to be able to easily change them from an outside xml, with a loadingfunction that adapts to whatever variables the class might have.   ;The pointer uses as much space as most values (except for thing like variable length strings (which might be made fixed length) --- so you could use the class structures themselves and inherit pieces of serialization /deserialization functions which write in a XML file format  and read/parse the same XML file (usually having type indicators to specify which class variants were activated).Your methods would read  into the class data structures and allocate any elements which are dynamic sized.   