Typedef is very useful for portable names, tag names (typedef struct foo Foo;
) and
keeping complicated (function) declarations readable (typedef int
(*cmpfunc
Individual programmers are not required to create their own typedefs. There's no universal rule saying I can't write things like
int *(*(*x())[5])();
if I so desire (although my company's coding standards may frown on it).
They're all over the standard library, however (FILE
, size_t
, etc.), so you really can't avoid using typedef names.