本质
多取一个名字,简化代码。
使用格式
一、为基本数据类型定义新名
typedef int Z;
把int形变量命名为Z。
二、为结构体定义简介名称
typedef struct Student
{
int sid;
char name[20];
char sex;
}* PST,ST;
ST代表struct Student。
PST代表struct Student*。
struct Student st; 等价于 ST st。
多取一个名字,简化代码。
typedef int Z;
把int形变量命名为Z。
typedef struct Student
{
int sid;
char name[20];
char sex;
}* PST,ST;
ST代表struct Student。
PST代表struct Student*。
struct Student st; 等价于 ST st。