In C++ how to have memory only for one variable define both in base & derived class
<p>Is it possible to have memory for only one variable (defined in both base as well as derived class)if we create object of derived class. If can, what is the reason behind it, please provide complete explanation.</p>

<pre><code>class Base
{
private:
    int i;
}

class derived: public /* or private or protected (whatever fits in my question) */
    Base
{
private:
    int i;
}

int main()
{
   derived obj;
}
</code></pre>
