i have encountered a problem that is i have defined a static member variable inside a class with access specifier being private but whenever a constructor is called corresponding an object the compiler displays an error "undefined reference to MyObject::count" here is my class member variable declaration
class MyObject
{ private:
        static int count;
  public:
      MyObject()
         {
           count=0;
          }
 };    
 
    