[英]What does the struct declaration typedef struct A { … } B; mean?
What is the name of the struct below — node_t
or node
? 下面的结构的名称是node_t
或node
什么? Why is there any difference? 为什么有什么区别?
typedef struct node_t
{
int data;
struct node_t *right, *left;
} node;
You are defining a name ( node
) for the struct node_t
. 您正在为struct node_t
定义一个名称( node
)。
It allows you to create the structure using node myStruct
instead of struct node_t myStruct
. 它允许您使用node myStruct
而不是struct node_t myStruct
创建结构。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.