#include<stdio.h>
#include<string.h>
typedef int ZHANGSAN;
//为int取一个别名ZHANGSAN,此时ZHANGSAN等价于int
typedef struct Student{
int sid;
char name[100];
char sex;
} *PSTU,STU;
//PSTU等价于struct Student *,STU等价于struct Student
int main(void){
STU st; //等价于struct Student st;
PSTU ps = &st;//等价于struct Student *ps = &st;
//strcpy(st.name,"LIXIANG");
//strcpy(ps->sex,"男");
st.sid = 55;
printf("%d \n",st.sid);
//printf("%d %s %c\n",st.sid,st.name,ps->sex);
return 0;
}
存疑,注释掉的地方会出错。