Cannot pass a pointer to a function
<p>I have removed all the unwanted segments. I am trying to pass pointers to an overloaded operator and use templates too. But this is still not working.</p>

<pre><code>#include&lt;iostream.h&gt;
#include&lt;conio.h&gt;

class Test{
      private:
             int a;
      public:
             Test (){}
             Test(int k){
                a=k;
             }
             Test* operator +(Test *p){
                  Test *temp=new Test(this-&gt;a+p-&gt;geta());
                  return temp;
             }
             int geta(){
                  return a;
             }
};

template&lt;class T&gt;  
   T* sum(T* a,T* b){
   return a+b;
}

int main(){
    Test *t1,*t2;
    t1=new Test(5);
    t2=new Test(7);
    Test *z=sum(t1,t2);
    cout&lt;&lt;z-&gt;geta();
    getch();
}
</code></pre>
