<分区>
Possible Duplicates:
Why should we typedef a struct so often in C?
Difference between ‘struct’ and ‘typedef struct’ in C++?
以下类型声明之间有什么区别?
struct Person
{
int age;
};
typedef struct
{
int age;
}Person;
我明白了
struct
{
int age;
}Person;
创建一个名为 person 的未命名结构的实例,其中
struct Person
{
int age;
};
声明了一个名为 person 的类型,但不是一个实例。但我仍然不明白 typedef 的作用。