typedef struct typedef用于定义一种新类型例如定义了如下的结构typedef struct student{int age;int score;}STUDENT;那么则有STUDENT stu1;就相当于struct student stu1;上面的结构也可以直接定义为:typedef struct {int

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/02 21:39:50

typedef struct typedef用于定义一种新类型例如定义了如下的结构typedef struct student{int age;int score;}STUDENT;那么则有STUDENT stu1;就相当于struct student stu1;上面的结构也可以直接定义为:typedef struct {int
typedef struct
typedef用于定义一种新类型
例如
定义了如下的结构
typedef struct student
{
int age;
int score;
}STUDENT;
那么则有
STUDENT stu1;
就相当于struct student stu1;
上面的结构也可以直接定义为:
typedef struct
{
int age;
int score;
}STUDENT;
然后将STUDENT作为新类型使用,比如STUDENT stu1;
在百度上授的,可我还是不知道他的意思麻烦人家帮我看以下

typedef struct typedef用于定义一种新类型例如定义了如下的结构typedef struct student{int age;int score;}STUDENT;那么则有STUDENT stu1;就相当于struct student stu1;上面的结构也可以直接定义为:typedef struct {int
typedef声明新的类型来代替已有的类型的名字.
如:
typedef int INTEGER;
下面两行等价
int i;
INTEGER i;
可以声明结构体类型:
typedef struct
{
int age;
int score;
}STUDENT;
定义变量:
只能写成 STUDENT stu;
如果写成
typedef struct student
{
int age;
int score;
}STUDENT;
下面三行等价:
STUDENT stu;
struct student stu;
student stu;
大概意思就是上面的,不太明白hi我.