2 ms·
Not saying it’s pretty or perfect, but you can make it work (https://godbolt.org/z/asW3zvxa9 https://godbolt.org/z/asW3zvxa9): #define f_deref_ptr (*f_ptr)
by mananaysiempre 5y ago
Not saying it’s pretty or perfect, but you can make it work (https://godbolt.org/z/asW3zvxa9 https://godbolt.org/z/asW3zvxa9):
#define f_deref_ptr (*f_ptr)
/* ... */
print_result(&f_deref_ptr, x);
Function types (as opposed to function pointer types), along with array types, are kind of shy in C, but it is possible to get hold of and use them.