Declaring multiple types with typedef

suggest change

The typedef keyword is a specifier, so it applies separately to each declarator. Therefore, each name declared refers to the type that that name would have in the absence of typedef.

int *x, (*p)();         // x has type int*, and p has type int(*)()
typedef int *x, (*p)(); // x is an alias for int*, while p is an alias for int(*)()

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents