Including headers inside class declaration / definition
<p>I know you can do something like:</p>

<p>def.h:</p>

<pre><code>A();
int x;
</code></pre>

<p>A.h</p>

<pre><code>class A
{
public:
#include "def.h"
}
</code></pre>

<p>A.cpp</p>

<pre><code>A::A()
{
    x = 0;
}

int main()
{
    A a;
    return 0;
}
</code></pre>

<p>My questions is: why would you do this? Are there any advantages? I can see how it would be helpful if you have some classes with the same members but not the same base, but is it worth the hassle? It's not very readable, is it? 
Also, how does the compiler treat these includes? Does it just paste the content of the header where it's included (kind of like a macro)?</p>
