title: how to make pointer to non-member-function?
body: <p>if  i have for example class A which contains the functions:</p>
  
  <pre><code>//this is in A.h
  friend const A operator+ (const A&amp; a,const A&amp; b);
  friend const A operator* (const A&amp; a,const A&amp; b);
  </code></pre>
  
  <p>which is a global (for my understanding). this function implemented in A.cpp.</p>
  
  <p>now, i have class B which also contains the functions, and the member:</p>
  
  <pre><code>//this is in B.h
  friend const B operator+ (const B&amp; a,const B&amp; b);
  friend const B operator* (const B&amp; a,const B&amp; b);
  A _a;
  </code></pre>
  
  <p>instead of using two seperate methods, i want to create single method in B.h:</p>
  
  <pre><code>static const B Calc(const B&amp;, const B&amp;, funcP);
  </code></pre>
  
  <p>which implemented in B.cpp and funcP is typedef to the pointer to the function above:</p>
  
  <pre><code>typedef const A (*funcP) ( const A&amp; a, const A&amp; b);
  </code></pre>
  
  <p>but when i tried to call Calc(..) inside the function i get this error: 
  "unresolved overloaded function type". i call it this way:</p>
  
  <pre><code>friend const B operator+ (const B&amp; a,const B&amp; b){
      ...
      return B::Calc(a,b, &amp;operator+);
  }
  </code></pre>
  
  <p>what am i doing wrong?</p>