How to access a data member and a member function from a member function of another class?
<p>if i write a class-</p>

<pre><code>class A
{
    int x;
    void show()
    {
       cout&lt;&lt;a;
    }
};

int main()
{
   A a;
   a.show();
   a.x;
}
</code></pre>

<p>But If another class B is ther then how the member function of A accessed inside member function of class B-</p>

<pre><code>class B
{
    int y;
    void display()
    {
       cout&lt;&lt;y;
    }
};
</code></pre>

<p>Plz reply.</p>

<p>Thanks..</p>
