title: In C++, calling a derived constructor creates a base object or not?
body: <pre><code>#include&lt;iostream&gt;
  using namespace std;
  
  class Base{
      private:
          int x;
  
      public:
          Base(int i){
              x = i;
          }
  
          void print(){
              cout&lt;&lt;x&lt;&lt;endl;
          }
  };
  
  class Derived: public Base{
      public:
          Base b;
  
      public:
          //the constructor of the derived class which contains the argument list of base class and the b
          Derived(int i, int j): Base(i), b(j)
          {}
        
  };
  
  int main(){
      Derived d(11, 22);
      d.print();
      d.b.print();
      return 0;
  }
  </code></pre>
  <p>Why is the value of <code>b.x</code> 11, but the value of <code>d.b.x</code> is 22?</p>
  <p>If the constructor of the base class initializes the int <code>x</code> in class <code>Base</code>, does a <code>Base</code> object exist?</p>
  <p>In the argument list of the derived constructor, should there be one argument or two arguments when there is a <code>Base b</code> as a class member?</p>