Mnemonic for writing function pointerssuggest change
All C functions are in actuality pointers to a spot in the program memory where some code exists. The main use of a function pointer is to provide a “callback” to other functions (or to simulate classes and objects).
The syntax of a function, as defined further down on this page is:
A mnemonic for writing a function pointer definition is the following procedure:
- Begin by writing a normal function declaration:
- Wrap the function name with pointer syntax: