C语言创建结构体的格式
//五个创建结构体的代码写法
typedef struct students{ //这里的名称在后面创建新变量时用,如 student hong;
int age;
char sex;
}lihua,xiaoming;
typedef struct{
int age;
char sex;
}lihua,xiaoming; //这里表示已创建lihua、xiaoming两个该型结构体
struct students{ //没有typedef也可
int age;
char sex;
};
struct students{
int age;
char sex;
}lihua,xiaoming;
struct{
int age;
char sex;
}lihua,xiaoming;
欢迎纠错、补充