C语言--typedef struct与struct定义结构体的区别

我在不少C语言代码中看到不少定义结构体时使用typedef struct,而不适用struct,就了解了这样作的缘由:node typedef是类型定义的意思。typedef struct 是为了使用这个结构体方便。 具体区别在于: (1)若struct node {}这样来定义结构体的话。在申请node 的变量时,须要这样写,struct node n; (2)若用typedef,能够这样写,t
相关文章
相关标签/搜索