Declare Before use in C++?
<p>Following code does compile whereas name "aNumber" is not declared before use.</p>

<pre><code>class A
{
    A()
        :aNumber(100)
    {
    }
    void foo()
    {
         aNumber = 0;

    }
    int aNumber;
};
</code></pre>

<p>If above code compiles then why not following :-</p>

<pre><code>A.
class Dummy
{
    void foo(INT);
    typedef int INT;
};
</code></pre>

<p>B.Default initialization by member variable :-</p>

<pre><code>class Dummy
{
    void foo(int y = x);
    int x;
};
</code></pre>
