|
-
June 22nd, 2007, 04:54 AM
#1
Singleton Correct Usage
Finding clear examples of singleton patterns isn't hard, but I am having trouble implementing them. Mainly, is there a way to set one at class level or am I completely off track?:
class SingletonUser
{
protected:
Singleton* singleton;
Public:
SingletonUser()
{
singleton = Singleton::GetInstance();
// error LNK2001: unresolved external symbol
// "private: static class Gravity * Gravity::m_instance"
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|