Please find the code below:
#include <iostream> using namespace std; template<typename T> class A { static A* self; }; template<typename T> A* A<T>::self = NULL; int main() { return 0; } I am facing a compilation problem while initialising the static pointer. Even though so many links has said the same way (the way i initialised) but still the problem resist. Below is the compilation error.
"expected constructor, destructor, or type conversion before '*' token"