C++ keeping access to protected member (of the function argument) when specializing base template class
<p>could anyone please help to resolve this (the problem is persistent under both GCC and VC++).</p>

<pre><code>template &lt;class T&gt; class A{  
protected:  
    T a;  
public:  
    A(int aa=0){a=aa;}  
    virtual ~A(){}  
    virtual void plus(A const *AA){a=a+AA.a;}  
};  

class B:public A&lt;int&gt;{  
public:     
    B(int bb=0):A&lt;int&gt;(bb){}  
    virtual ~B(){}  
    void plus(A&lt;int&gt; const *AA){a=a+AA-&gt;a;} //&lt;--PROBLEM: I can access a but not AA-&gt;A?  
};  
</code></pre>
