使用 typedef 声明多个类型

typedef 关键字是一个说明符,因此它分别应用于每个声明符。因此,声明的每个名称都指的是在没有 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(*)()