accessing class object types C++
<p>How can i access class obect types in a statically declared private member function?:</p>

<pre><code>class Y
{
..
private:
    friend class X;
    X *myX;
}; 
class X
{
public:
      friend class Y;
private:
    static int foo( const char * const key );
    Y *myX;
};


int X::foo( const char * const key )
{
    X *myX = NULL; // illegal.
}
</code></pre>

<p>static cast and static cast references are not working as I had intended.</p>
