How to read stuff like this: char* (*(*foo[5])(char*))[];
To read complex declaration follow those rules to get the order:
() indicating a function, and [] an array* indicating a pointer toThe precedence order is [], *, char
[5] = foo is an array of 5* = pointer tochar = charGiving : foo is an array of 5 pointer to char
The precedence order is (*foo), [5], char
(* ) = foo is a pointer to[5] = an array of 5char = charfoo is a pointer to an array of 5 char
(*foo) = foo is a pointer to(char*) = to a function taking a char*char* = returning a char*foo is a pointer to a function taking a char* and returning a char*
foo[5] = foo is an array of 5*foo = pointer to(char*) = function that take a char*(*()()) returning a pointer to(()())[] an arraychar* of char*foo is an array of 5 pointer to a function that take a char* as argument and return a pointer to an array of char *