Mnemonic for writing function pointers

suggest change

In most expressions a function designator is converted to a pointer to the function. The function itself is not a pointer object. Function pointers are commonly used as callbacks.

The syntax of a function pointer is:

returnType (*name)(parameters)

A mnemonic for writing a function pointer definition is the following procedure:

  1. Begin by writing a normal function declaration: returnType name(parameters)
  2. Wrap the function name with pointer syntax: returnType (*name)(parameters)

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents