title: Self-returning class?
body: <p>I was wondering if (in C++) you can  instantiate a class (class foo) then have said class return the already instantiated object. (foo::instance())</p>
  
  <p>In other words, can I have a class return it's-self via it's own methods? I want to be able to create a class (i.e. class foo) early in my program so it is already setup and ready to go. Then, farther down the line, I want to be able to call functions from that class without having to pass that object as an argument to my calling function. Can I do something like so:
  <code>MyClass::ReturnSelf()-&gt;foo();</code>
  or
  <code>MyClass::ReturnSelf().foo();</code></p>
  
  <p>EDIT: I just realized this might be a little unclear. I want to be able to have another class call this "self-returning" method so it can use the already instantiated object's methods and members without creating a new object.</p>