c 2248 error during private variable access
<p>I was trying to access the private variable from a class using a public function.</p>

<pre><code>class myCls : public CFormView
{
private:
CString pvtMem;

public:
CString getPvtmem() { return pvtMem; }
}
</code></pre>

<p>I did something like this:</p>

<pre><code>myCls *lmyCls = new myCls() ;
CString *lPvtMem = lmyCls-&gt;getPvtmem();
</code></pre>

<p>but I got error c2248
then I changed pvtMem from private to public.
But i ended up in same error.
I tried to access pvtMem directly using object since its public. 
But dint seem to work.
I did all sorts of hits like</p>

<pre><code>myCls lmyCls;
CString lPvtMem = lmyCls.pvtMem ;
</code></pre>

<p>Compiler is not liking anything :(
well, myCls  is defined in file BatchDlg.h which i #included in 
my calling class.
I did add class reference for the last hit like class myCls in calling class.</p>
