Typedef
suggest changeA typedef declaration puts the keyword typedef among the declaration specifiers, usually before the type:
typedef int (*(*t0)())[5];
(you can technically put the typedef after the type too - like this int typedef (*(*t0)())[5]; but this is discouraged)
Before C23, the empty parentheses mean the function type has no prototype. In C23 they mean (void). The declaration gives t0 a typedef name. Use it like this:
t0 pf;
Which will have the same effect as writing:
int (*(*pf)())[5];
The typedef name stands for that type in later declarations. It can itself be used to build a more complicated type:
t0 (*pf1);
Is the same as:
int (*(**pf1)())[5];
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents