C++ protected access
<p>is there anyway i can access a protected variable in a class without inheritance.</p>

<pre><code>class ClassA{
  protected:
    int varA; 
};

class ClassB{
  protected:
    ClassA objectA;

};


ClassB theMainObject;
</code></pre>

<p>I would like to access varA through theMainObject.</p>
