1. pointer function: Refers to a function whose return value type is a pointer type. Essentially, it is a function, such as int * function (void). Here it can be considered as int * function (void ); the return value is int *, which is a pointer.
2. function pointer: essentially a pointer, But it points to a function, which is called a function pointer, such as int (* function) (void ).
It can be seen from this that the terms pointer function and function pointer can be different from the following two words: function or pointer.
In addition, function pointers have two purposes: Calling functions and making function parameters.
[Cpp]
Int func (int x); // declare a function
Int (* fp) (int x); // defines a function pointer.
Fp = func; // assign the first address of the func function to the pointer fp
Int func (int x); // declare a function
Int (* fp) (int x); // defines a function pointer.
Fp = func; // assign the first address of the func function to the pointer fp
3. Callback Function: a function called using a function pointer. If you pass the pointer (address) of a function as a parameter to another function, when this pointer is used to call the function to which it points, we will say this is a callback function.