|
-
July 5th, 2010, 09:50 AM
#3
Re: C++ Singleton Problem
 Originally Posted by S_M_A
Move the definition part into a cpp file and leave just the declaration part in the header.
That is what I had in the first place, and it just would not compile or link then.
I only got it working by moving everything into one header file. And it worked for one include into main.cpp;
But when i created another test.cpp file to check whether it would limit the number of singletons as designed, it gave the link errors I originally posted.
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
|