Which one makes more sense? Or which one is more common / better practice?
typedef double (function_t)(int, void*);
...
function_t *ptr = /* something */;
or
typedef double (*function_t)(int, void*);
...
function_t ptr = /* something */;
They seem to work the same, but I find myself using one way in one project, and the other way in another. Is there any consensus on which one is better? (Due to readability, understandability, etc.)
New contributor
Diego Comfort is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.