typedef定义结构体的用法?

Typedefstruct{}structname;

示例:Typedefstruct{}nullstruct

要在C中定义结构类型,请使用Typedef:

Typedefstructstudent

{

intm

}stu

以这种形式定义时,可以在声明结构变量时使用它:stustu1,它在这里也等效于stu和structstu1Student与stu相同,stu是structStudent的另一个名称。

typedef结构体指针typedefstruct用法typedef的用法结构体