title: C++ Type undefined reference to `vtable for Producer'
body: <p>I keep recieving error  undefined reference to `vtable for Producer'
  for my sub class Producer :</p>
  
  <pre><code>#include "Producer.h"
  
  Producer::Producer (unsigned int ID, int age1, std::string name1,
          char gender1, std::string jobDescription1)
          {IDNumber = ID; age = age1; name = name1;
          jobDescription = jobDescription1; gender = gender1;}
  
  void SetJobDescription(std::string description){}
  
  void PrintPersonnel(){cout&lt;&lt;"";}
  
  Producer::~Producer(){}
  </code></pre>
  
  <p>the parent is:</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;iostream&gt;
  
  
  class Personnel{
  protected:
      unsigned int IDNumber;
      int age;
      std::string jobDescription;
      std::string name;
      char gender;
  public:
  
      virtual void PrintPersonnel() = 0;
  
      unsigned int GetID();
  
      int GetAge();
  
      std::string Getname();
  
      std::string GetjobDescription();
  
      char GetGender();
  
      virtual ~Personnel();
  
  };
  </code></pre>
  
  <p>//Personel.cpp</p>
  
  <pre><code>#include "Personnel.h"
  unsigned int Personnel::GetID(){return IDNumber;}
  
  int Personnel::GetAge(){return age;}
  
  std::string Personnel::Getname(){return name;}
  
  std::string Personnel::GetjobDescription(){return jobDescription;}
  
  char Personnel::GetGender(){return gender;}
  
  Personnel::~Personnel(){}
  </code></pre>
  
  <p>It has a pure virtual function.
  why can't I implement the child class Producer?</p>
  
  <p>thanks a lot. </p>