typedef struct 的用法
代码语言:javascript复制#include
typedef struct student{
int age;
char gender;
}stu1;
int main(){
stu1 stu;
stu.age=11;
printf("%d",stu.age);
}
没有 typedef
代码语言:javascript复制#include
struct student{
int age;
char gender;
}stu1;
int main(){
struct student stu1;
stu1.age=11;
printf("%d",stu1.age);
}