Sep 6, 2009 at 7:40pm
Hi all,
I have a class MyClass with one static pointer :
.h :
static SomeOtherClass *test;
.cpp :
SomeOtherClass MyClass::*test= 0;
But when I try to access this static pointer from some other class,
I get a couple of errors :
C:/Documents and Settings/USER/Desktop/workspace/MyProject/someclass.cpp:213: undefined reference to `MyClass::test'
Any ideas where might be the problem ?
Sep 6, 2009 at 7:43pm
p.s. :
I'm using another static variable, but it's not a pointer to class and it's not giving any troubles.
Sep 6, 2009 at 7:49pm
SomeOtherClass *myClass::test = 0;
Sep 6, 2009 at 8:36pm
Ah, yes... I sometimes hate this syntax. :)
Regards