New Paste :: Recent Pastes:: No Line Numbers
linkage'd by godecho
1
// linkage error: // main.obj : error LNK2001: unresolved external symbol "protected: static class Blert * Blert::_instance" (?_instance@Blert@@1PAV1@A) #include <iostream> #include <map> using::std::cout; using::std::endl; using::std::map; class Blert { public: static inline Blert *Inst() { return _instance; } protected: Blert() { _instance = new Blert; } ~Blert() { delete _instance; } static Blert *_instance; private: // nothing }; int main(int argc, char **argv) { cout << Blert::Inst() << endl; return 0; }