title: Why is protected constructor raising an error this this code?
body: <p>One question about protected constructor. I learnt that the protected constructor can be used in the derived class. How ever, I found the code below has an error. Why does it happen like this?</p>
  
  <pre><code>class A
  {
      protected:
          A(){}
  };
  
  class B: public A {
      public:
          B() {
              A* f=new A();           // Why it is not working here
          }
  };
  </code></pre>