Jump to content
  • Create New...
  • 0

C++ Singleton Class Question/Problem



Iam currently stuck with a Singleton Class problem (err:

Hidden Content

    Give reaction to this post to see the hidden content.


In my header file i bequeathed the singleton class to my CMyClass Class

class CMyClass: public singleton<CMyClass>

Do I have to something else apart from bequeathing? Because Everytime i try to execute the function I get the error above. Without the Singleton Function it is working.

So there is no logic mistake. 


Can Somebody explain me what i have to do in order to use the ymir Singleton template Class?


Kind Regards

Link to comment
Share on other sites

  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

3 answers to this question

Recommended Posts

  • 0

The singleton class in Ymir's sources does not make use of lazy initialization, so you actually need to explicitly initialize it somewhere. Open up the main.cpp file and you'll see many (if not all) of the singleton classes initialized on the stack there: do the same for your class and it should work fine.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.