结构体名,结构体变量名,声明变量三者直接的关系
参考链接:https://zhidao.baidu.com/question/492051264.html
参考链接1:https://blog.csdn.net/scc_722/article/details/80781387?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-2.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-2.nonecase
参考链接2:https://blog.csdn.net/huqinweI987/article/details/23625823?utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-2.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-2.nonecase
参考链接3:https://zhidao.baidu.com/question/463638906.html
参考链接4:https://www.cnblogs.com/fnlingnzb-learner/p/5987120.html
typedef struct Stu
{
char name[10];
char number[10];
int age;
}stu1;
来源链接:http://blog.sina.com.cn/s/blog_7e102f620101dedz.html
Stu指的是结构体的标签名,可以理解为C++中的类名。
char name[10];
char number[10];
int age;
以上3个基本数据类型为成员列表。
stu1为结构体的变量名,可以理解为C++中类实例化的对象名。
结构体前面加不加typedef有什么区别?
来源链接:https://blog.csdn.net/iteye_11341/article/details/81766376