Inheritance and private members
<pre><code>#include&lt;iostream&gt;  
using namespace std;  

class Base {  

private:  
    int b;  
public:  
    Base(int bvalue=0) {  
        b = bvalue;  
        cout &lt;&lt; "B's ctor" &lt;&lt; endl;  
    }  
    ~Base() { }  
};  

class Derv : public Base {  
public:  
   int d;  
   Derv(int bval, int dval) : Base(bval),d(dval) {  
       cout &lt;&lt; "D's ctor" &lt;&lt; endl;  
   }  
   Derv(int dval) : d(dval) {  
       cout &lt;&lt; "D's ctor " &lt;&lt; endl;  
  }  
};  

int main(){  
    Derv D1(4,5);  
    Derv D2(100);  
    return 0;  
}  
</code></pre>

<p>The above program compiles fine and I see the output as  </p>

<pre><code>B's ctor  
D's ctor  
B's ctor  
D's ctor 
</code></pre>

<p>Since private members of Base class are not inherited, what is the memory location the Base constructor is creating the private member in?  </p>

<p><strong>NB:</strong> This question contains a misconception which is fully addressed in the answers.</p>
