Declaring nested classes before they are defined
<p>I can declare a pointer to a class that hasn't yet been defined, like this:</p>

<pre><code>class A ;
A* p ;
</code></pre>

<p>But how do I do this for a nested class? I want to do this:</p>

<pre><code>class A ;
class A::B ; // error: 'B' in class 'A' does not name a type
A::B* p ;
</code></pre>

<p>But it doesn't compile (using g++ 4.5.2). Is there any way to make this work?</p>
