Pointer to function parameter vs function parameter?

后端 未结 3 1937
遇见更好的自我
遇见更好的自我 2021-02-20 10:50

I\'d like to understand what is the difference between the 2 declarations, f1 and f2, below: In f1 I declare the parameter to be a pointer

3条回答
  •  别那么骄傲
    2021-02-20 11:23

    They are alternative syntax for the exact same thing. In both cases a function pointer is passed, but you are allowed to use non-pointer syntax in the parameter list. Use of a function name always decays to a pointer to function (and this can happen recursively).

提交回复
热议问题