typedeft
直接上代码:#include<stdio.h>#include<malloc.h>
typedef struct Student
{
int id;
char name;
char sex;
}*PSTU,STU;//等价于ST代表了 struct Student,PST 代表了struct Student *
int main()
{
STU st;//struct Student st;
PSTU ps=&st;//struct Student *ps=&st;
ps->id=99;
return 0;
}
页:
[1]