Why this can not be passed as default parameter in member function?
<p>I was trying to pass the current value of length as the default parameter as a function argument . 
but compiler is showing error that</p>

<blockquote>
  <p>" 'this' may not be used in this context"</p>
</blockquote>

<p>can any one tell me what is the mistake I have committed. ?</p>

<pre><code>class A
{

    private:
    int length;
    public:
    A();
    void display(int l=this-&gt;length)
    {
        cout&lt;&lt;"the length is "&lt;&lt;l&lt;&lt;endl;
    }

};


int main()
{

    A a;
    a.display();    
    return 0;

}
</code></pre>
