Defining private static class member
- by mnn
class B { /* ... */ };
class A {
public:
A() { obj = NULL; }
private:
static B* obj;
};
However this produces huge mass of linker errors that symbol obj is unresolved.
What's the "correct" way to have such private static class member without these linker errors?
Edit: I tried this:
B *A::obj = NULL;
but I got about same amount of…