[Question]:
 
My goal is to create a container for a different type of object. All required classes are derived from the same class first, and then pressed into the container. See the following code: Synobject is a base class, Synpin and Synpin are subclasses derived from the base class,class synObject {
 public :
 synObject();
 string GetClass();
 string className;
 };
 synObject::synObject()
 {
 className = "synObject";
 }
 string synObject::GetClass()
 {
 return className;
 }
 class synPin : public synObject {
 string pin;
 public :
 synPin();
 void  SetPin(string Pin);
 string GetPin();
 private:
 };
 synPin::synPin()
 {
 className = "synPin";
 }
 void synPin::SetPin(string Pin)
 {
 pin = Pin;
 }
 string synPin::GetPin()
 {
 return pin;
 }
 class synCell : public synObject {
 string cell;
 public :
 synCell();
 void  SetCell(string Cell);
 string GetCell();
 private:
 };
 synCell::synCell()
 {
 className = "synCell";
 }
 void synCell::SetCell(string Cell)
 {
 cell = Cell;
 }
 string synCell::GetCell()
 {
 return cell;
 }