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:

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


Typedef and type aliases:
* Declaring multiple types with typedef

Table Of Contents
8 Arrays
11 Loops
39 Streams
51 Unions
56 Lambdas
60 SFINAE
62 RAII
67 Sorting
84 RTTI
87 Scopes
104 Profiling
107 Recursion
117 Iteration
125 Alignment
130 Typedef and type aliases
134 Semaphore
136 Debugging
139 Mutexes
142 decltype