typedef struct 是c语言的问题
来源:学生作业帮助网 编辑:作业帮 时间:2024/10/01 11:00:46
x)+,HMIMS(.)*M.Qx6c}k_hx>u/ͰI*GWæVΆTCOYdWu|g6<߸n'.k3v|gZ4%5,U
&3JS"(68$/{ٴΎ3@eAB<ݰONF{fCEp>9i'>YRw3g8-۞N{
*d
0}w?0uDT$ف" u Q
typedef struct 是c语言的问题
typedef struct
是c语言的问题
typedef struct 是c语言的问题
typedef用于定义一种新类型
例如
定义了如下的结构
typedef struct student
{
int age;
int score;
}STUDENT;
那么则有
STUDENT stu1;
就相当于struct student stu1;
上面的结构也可以直接定义为:
typedef struct
{
int age;
int score;
}STUDENT;
然后将STUDENT作为新类型使用,比如STUDENT stu1;