title: Protected section: no matching function to call
body: <p>Can somebody tell my why this code doesn't work? I've got: no matching function for call to 'Child::Child()' error. How to put this child into protected section properly? :(</p>
  
  <pre><code>class Child
  {
  protected:
      int cAge;
  public:
      Child(int c)
      {
          this-&gt;cAge=c;
      }
  };
  
  class Parent
  {
  protected:
      int pAge;
      Child child;
  public:
      Parent(int d)
      {
          this-&gt;pAge=d;
      }
  };
  
  int main()
  {
  
  }
  </code></pre>