| c++ Programming Glossary: derivedbReflective Factory in C++ Derived class unable to access protected methods? http://stackoverflow.com/questions/10193280/reflective-factory-in-c-derived-class-unable-to-access-protected-methods  DerivedA AbstractFactory createInstance DerivedA m_map DerivedB AbstractFactory createInstance DerivedB int main Factory factory.. DerivedA m_map DerivedB AbstractFactory createInstance DerivedB int main Factory factory Base a factory.Create DerivedA DerivedA.. std string SayHello  return Hello from DerivedA struct DerivedB public Base virtual std string SayHello  return Hello form DerivedB.. 
 Are static variables in a base class shared by all derived classes? http://stackoverflow.com/questions/1390913/are-static-variables-in-a-base-class-shared-by-all-derived-classes  Base static int staticVar class DerivedA public Base class DerivedB public Base Will both DerivedA and DerivedB share the same staticVar.. Base class DerivedB public Base Will both DerivedA and DerivedB share the same staticVar or will they each get their own If.. 
 Is there a way to instantiate objects from a string holding their class name?  http://stackoverflow.com/questions/582331/is-there-a-way-to-instantiate-objects-from-a-string-holding-their-class-name  a file Base.h class Base class DerivedA public Base class DerivedB public Base etc... and another file BaseFactory.h #include Base.h.. DerivedA  return new DerivedA else if msClassName DerivedB  return new DerivedB else if etc...  etc...  private string.. new DerivedA else if msClassName DerivedB  return new DerivedB else if etc...  etc...  private string msClassName etc. Is there.. 
 |