title: Functors - how can I use them with typedef?
body: <p>This is a functor:</p>
  
  <pre><code>class add_x {
  
   int x;
  
  public:
    add_x(int x) : x(x) {}
    int operator()(int y) { return x + y; }
  
  };
  </code></pre>
  
  <p>And from main I can do this:</p>
  
  <pre><code>add_x add10(10); // create my functor 
  int i = add10(20); // add 20 and return it 
  </code></pre>
  
  <p>How can I combine the functor with <code>typedef</code>?</p>
  
  <p>For instance, I came across this:</p>
  
  <pre><code>typedef int (*myfuncType)(float f, char c1,char c2);
  myfuncType pt2Function = NULL; 
  </code></pre>
  
  <p>But what am I defining here exactly? operator <code>()</code>?</p>