title: C++ Abstract Class: constructor yes or no?
body: <p>A class with one (or more) virtual pure functions is abstract, and it can't be used to create a new object, so it doesn't have a constructor.</p>
  
  <p>I'm reading a book that provides the following example:</p>
  
  <pre><code>class Employee {
     public:
         Employee(const char*, const char*);
         ~Employee();
         const char* getFirstName() const;
         const char* getLastName() const;
  
  
         virtual double earnings() const=0  // pure virtual =&gt; abstract class
         virtual void print() const
  
    private:
         char* firstName, lastName;
  };
  </code></pre>
  
  <p>If the class is abstract why we have a constructor? It uses this class later (<code>Boss</code> is public derived from <code>Employee</code>):</p>
  
  <pre><code>void Boss::Boss (const char* first, const char* last, double s)
       : Employee (first, last)
  </code></pre>