C
Christian Schilling
Hi,
I am wondering whether a static function can return a reference to an
instance that was created?
Say I have an instance of an object "foo" created somewhere.
Some other part of the program wants to access that object, but does not
know where it is .I want to circumvent the global variable thing, if
possible.
so sth like:
include "foo.h"
...
foo = *myfoo;
foo = foo::getInstance();
...
would be great if it works ...
Response will be greatly appreciated. Preferably binary answers ; )
I am wondering whether a static function can return a reference to an
instance that was created?
Say I have an instance of an object "foo" created somewhere.
Some other part of the program wants to access that object, but does not
know where it is .I want to circumvent the global variable thing, if
possible.
so sth like:
include "foo.h"
...
foo = *myfoo;
foo = foo::getInstance();
...
would be great if it works ...
Response will be greatly appreciated. Preferably binary answers ; )