C ++ function pointer defined

One:  how to define a function pointer

 The function of type int (int, int), in order to declare a pointer to a function of the class, you can simply replace the function name with a pointer :

int (* PF) ( int, int); // uninitialized  

 

The function pointer can be called all int two formal parameters, int and return type of the function, a function pointer variable names to be assigned to the line

2: The definition of the function pointer typedef

Guess you like

Origin www.cnblogs.com/chengzxhang/p/11518713.html