I have the following code:

Code:
myObject = new CMyClass();
myObject->MyMethod()->CreateInstance("fgdffgdg")
where MyMethod returns a singleton object. But what I would like to know is how do I add the object to a list before returning back?

Code:
CMyClass
{
      CSingleton* m_singletonClass;

      CSingleton* MyMethod()
      {
         // here I'd like to add to a list after its been created, and then return
         return m_singletonClass;
      }
};
Any ideas?

Regards

John