E
Ed
Hi, guys,
I am wondering if I could change the static variable value in one
static function?
If I have a class:
class Apple
{
public:
static Apple* Instance()
{
static Apple* pInstance(NULL);
if( ! pInstance)
{
pInstance = new Apple();
}
return pInstance;
}
}
Can I change the pInstance from outside?
Something like: Apple::Instance():Instance = NULL;
Thanks!
I am wondering if I could change the static variable value in one
static function?
If I have a class:
class Apple
{
public:
static Apple* Instance()
{
static Apple* pInstance(NULL);
if( ! pInstance)
{
pInstance = new Apple();
}
return pInstance;
}
}
Can I change the pInstance from outside?
Something like: Apple::Instance():Instance = NULL;
Thanks!