title: c++ inheritance and shared / non shared functions
body: <p>Thank you in advance for your help.
  Here's my problem :</p>
  
  <p>I've got sub-class (x, y, z) included in a class (A). Some functions are shared (declared in A) and other not (declared in the subclass). </p>
  
  <p>All the objects are stored in one map <code>map&lt;string,A&gt;Groups</code>.</p>
  
  <p>Then, I want to do a loop for all the functions using an iterator, but there come the problem of the functions that belonged only to one class, it says that class A doesn't contain functions ...</p>
  
  <p>I would like to say 
  <code>for(it=Groups.begin(); it!=Groups.end(); ++it)
  {
    it-&gt;second.functionShared1()</code>
    <em>if objects1 belongs to class x : it->second.functionsOfClassX</em> and it understand it has to find the function in class x.</p>
  
  <p>I suppose this will be impossible but if you have an idea of how I can resolve this problem I will be really grateful. </p>
  
  <p>I though about creating virtual functions but it will be a mess, or to create a map for each class and a big map containing all the maps. But then I don't know how to iterate it and to declared outermap["x"]=innermap[x]. So that's it, sorry I just began C++, I hope I explained well. </p>