title: Problems about function pointers in C/C++
body: <p>I am reading Linux kernel recently.
  I find that in many cases they use the struct "typedef xxx f(xxx)", but I cannot understand how it works. (something like function pointer?)</p>
  
  <p>Here is my test code.</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  typedef int Myfunc(int);
  typedef int (*point_to_myfunc)(int);
  static Myfunc example;
  static int example(int a){
      printf("example a=%d\n", a);
      return 1;
  }
  static void example2(Myfunc* f){
      printf("example2\n");
      f(2);
  }
  static void example3(int (*)(int));
  static void example3(int (*point_to_Myfunc)(int)){
      printf("example3\n");
      point_to_Myfunc(3);
  }
  int main(){
      point_to_myfunc f=&amp;example;
      example2(f);
      example3(f);
      return 0;
  }
  </code></pre>
  
  <p>Can anyone provide a brief explanation for me? Thx~</p>