   static keyword
  I am using a static variable log of type class FileLog. FileLog is a basic class that logs text to a file. I want one log for all my instances of type Object.class Object{public:static void createLog(){log.create("LogObject.txt");}static void destroyLog(){log.destroy();}private:static class FileLog log;};I figure I should then be able to call:Object::createLog();Object::destroyLog();from the main program and inside Object I would be able to access log to output messages. This does not work. It gives me this error:: error LNK2001: unresolved external symbol "protected: static class FileLog  Object::log" (?log@Object@@1VFileLog@@A): fatal error LNK1120: 1 unresolved externalsCan anyone help me?-Greg Koreman  
  In exactly one source file you need to put the line:FileLog Object::log;This will create the storage for the log class.  ;  Thank you so very much. I thought I may be missing something like that.-Greg Koreman  ;  Off topic (this doesn't apply to original post, so there is no confusion), but it gets so much more complicated when you have a templated class with a template static member with a constructor that takes parameters.  Whew.  Basically...template &ltclass T> std::map&ltstd::string, T> TManager&ltT>::m_map(T::CompFunctor);instead of a simpleFileLog object::log;Yes, I know, I probably should look into a redesign.  EDIT:  Damn &lt and > with HTML![edited by - Neosmyle on November 5, 2002 12:40:07 AM]