For practice, I'm trying to :
Declare fubar to be a pointer to a function that takes a pointer to a char and returns a pointer to an array of 24 elements where each element is a pointer to a struct foo.
My logic is:
-fubar is a pointer to a function taking a char pointer:
(*fubar)(char*)
-...returning a pointer to an array of 24 elems of where each elem is a struct foo:
(struct foo *)(*fubar)(char*)[24]
Is my logic correct?
struct foo* (*fubar)(char*)[24]for this to be valid syntax.(struct foo *)is a typecast, which makes no sense in this case. You could have tried to remove the parentheses: cdecl.ridiculousfish.com/?q=struct+foo+*%28*fubar%29%28char*%29[24] and then it's not a syntax error anymore.