accessing a pointer member variable in derived class
<p>I have following code:</p>

<pre><code>class B{
    protected:
    X *x;
    public:
    function(char *data){
        // access x
        // works fine
    } 
};

class D: public B {
    function2(char *data)
    {
            // access x
            // gets garbage
    } 
};
</code></pre>

<p>I have a member variable which is pointer. moreover this pointer is inside  <code>"data"</code>  but when i access in class D it shows garbage.</p>

<p>can some body please help me... </p>
