|
| cppuser (73) | |
| 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 ? | |
| cppuser (73) | |
| p.s. : I'm using another static variable, but it's not a pointer to class and it's not giving any troubles. | |
| Chewbob (95) | |
| SomeOtherClass *myClass::test = 0; | |
| cppuser (73) | |
| Ah, yes... I sometimes hate this syntax. :) Regards | |
This topic is archived - New replies not allowed.
