title: C++ protected constructor for abstract classes
body: <p>i'm trying to figure out the difference between public constructor and protected constructor for an abstract base class.
  Let's say that i have two classes:</p>
  
  <p>Abstract Base Class: Monster</p>
  
  <pre><code>class Monster
  {
  public: // or protected?? what is the techincal difference?
      Monster(string name)
      {
          _name = name;
      }
  public:
      virtual void attack() = 0;
  
      const string getName() const
      {
          return _name;
      }
  
  private:
      string _name;
  
  };
  </code></pre>
  
  <p>Concrete Child Class: Spider</p>
  
  <pre><code>class Spider : public Monster
  {
  public:
      Spider(string name) : Monster(name)
      {
  
      }
  
      void attack() override
      {
          cout &lt;&lt; getName() &lt;&lt; ":(Spider) is attacking!" &lt;&lt; endl;
      }
  };
  </code></pre>
  
  <p>Now if i try to create a Monster instance:</p>
  
  <pre><code>int main()
  {
      Monster monster1 { "Abstract Monster Not Allowed" }; // Error
  }
  </code></pre>
  
  <p>Error: 
  Object of abstract class type "Monster" not allowed:
  Monster:: Attack is a pure virtual function.</p>
  
  <p>This perfectly makes sense, but so a 'public constructor' is an alias of 'protected constructor' in an abstract class?
  In which situation I could use protected constructor for an abtract class?</p>
  
  <p>Thanks in advance.</p>