recursive definition in CPP
<p>I meet a problem like this: <strong>UPDATE</strong></p>

<pre><code>class A
{
public:
    A(){}
    int i;
    B b;
};

class B
{
public:
    B(){}
    int j;
    A a;
};
</code></pre>

<p>When I define it in one .h file, it would give an error. I think the problem is the recursive definition. But could someone help me how to solve such issue?</p>

<ol>
<li><p><code>error C2146: syntax error : missing ';' before identifier 'b'   c:\users\xingyo\documents\visual studio 2010\projects\cppalgo\recudef\test1.h   9   1   RecuDef</code></p></li>
<li><p><code>error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\users\xingyo\documents\visual studio 2010\projects\cppalgo\recudef\test1.h   9   1   RecuDef</code></p></li>
<li><p><code>error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\users\xingyo\documents\visual studio 2010\projects\cppalgo\recudef\test1.h   9   1   RecuDef</code></p></li>
</ol>
