[Solved] C++ cannot initialize static data member [duplicate]
The following declaration within a definition of your class is not enough: private: static map_type * map; In one .cpp file, you must also add: map_type* BaseFactory::map = NULL; This article might help you too: Static data members (C++ only) + this question, which has almost 100k views by now: Initializing private static members 2 … Read more