Refer to another class inside a class
<p>Here is the situation. I have two classes inside two different files.</p>

<p>A.cpp:</p>

<pre><code>#include "B.h" 
A::A(){
B foo; //B doesn't name a type
}
</code></pre>

<p>B.cpp:</p>

<pre><code>Class B{
//code
};
</code></pre>

<p>How do I correctly construct an object of B inside A's constructor?(scoping issue) I tried </p>

<pre><code>B::B foo //wrong
</code></pre>

<p>and why I can't directly construct an object of class B like I did above, B.h has been included. Thank you very much</p>
