定义一个结构体类型,在申明变量时已“struct 结构体类型 变量名”的方式,使用的时候直接操作变量名就可以了。如果用typedef声明的数据类型,声明时只要“结构体类型(即新的变量类型 ) 变量名”就可以了。
如果是用来定义变量的话要用struct mmm { int a,b,c };struct mmm a[100];a[0].a=1; a[0].b=2; a[0].c=3; printf("%d\n",sizeof(struct mmm));