Hi all,
I am trying to implement singleton class having static method.
my requirement is as below:
A.h
Class A{
Public :
Static A* getInstance();
}
B.cpp
#include A.h
Class B : public class A{
A* A::getInstance()
{
//some code.
Return *A
}
}
D.cpp
#include B.h
A* pter = A::getInstance() // error: 'getInstance' is not a member of 'A'
please tell me what is wrong in this code.