Yes, you can declare a pointer to a function without a typedef, but there is no way to use the function name for this.
Typeed is commonly used because the syntax for declaring a function pointer is a little baroque. However, typedef is not required. You can write:
int (*ptr)(float);
declare ptr as a function of a pointer to a function that takes a float and returns an int - no typedef. But then again, there is no syntax that allows you to use the name myfunc for this.
Tyler mchenry
source share