Hi, this singleton class has a private method that I'm having trouble defining in the definition source code.
I have the header file as:
1 2 3 4 5 6 7 8 9 10
class Type
{
public:
~Type() {}
private:
Type() {}
static Type* Instance();
};
and the definition file as:
1 2
static Type Type::Instance()]
{}
TextureManager.cpp:3:23: error: prototype for ‘TextureManager TextureManager::Instance()’ does not match any in class ‘TextureManager’
static TextureManager TextureManager::Instance()
^
In file included from TextureManager.cpp:1:0:
TextureManager.h:17:32: error: candidate is: static TextureManager* TextureManager::Instance()
static TextureManager* Instance();