C++ nested classes issue
<p>i'm having some problems with C++ and nested classes. For example:</p>

<p>in main.cpp</p>

<pre><code>int main()
{

B b(par);
cout &lt;&lt; b.Aglobal-&gt;parametro;
cout &lt;&lt; b.Aglobal-&gt;parametro;
return 0;}
</code></pre>

<p>In B.cpp</p>

<pre><code>B: B(type par)
{

A a(par1,par2);
Aglobal=&amp;a;}
</code></pre>

<p>in B.h</p>

<pre><code>class B
{
public:
    B(type);
    A *Aglobal;}
</code></pre>

<p>in A.h</p>

<pre><code>class A
{

public:
    A(type1,type2);
    int parametro;}
</code></pre>

<hr>

<p>The main.cpp echoes are different and i can't undestand the reason.</p>
