I'm having problems accessing a static property in a class. I get the following error:
shape.obj : error LNK2001: unresolved external symbol "public: static class TCollection<class Shape *> Shape::shapes"
Class definition:
class Shape { public: static Collection<Shape*> shapes; static void get_all_instances(Collection<Shape*> &list); };
And the implementation of the static method:
void Shape::get_all_instances(Collection<Shape*> &list) { list = Shape::shapes; }
The shapes property does not seem to be initialized.
c ++ properties static
Louis
source share