I am having issues accessing a static property in a class. I am getting the following error:
shape.obj : error LNK2001: unresolved external symbol "public: static class TCollection<class Shape *> Shape::shapes"
The definition of the class is:
class Shape {
public:
static Collection<Shape*> shapes;
static void get_all_instances(Collection<Shape*> &list);
};
And the implementation of the static method being:
void Shape::get_all_instances(Collection<Shape*> &list) {
list = Shape::shapes;
}
It seems like the shapes
property isn't being initialized.