#include<stdio.h>
typedef int zhangsan; //为int多取一个名字 zhangsan
typedef char kkkk;
typedef struct Student{
int sid;
char name[];
char sex;
}mt,*jj; //mt 等价于 struct Student //jj 等价于 struct Student *
int main(){
// int i = 10;
// zhangsan j=20;
// printf("%d==%d\n",i,j);
mt a; //等价于 struct Student mt; a为结构体本身
struct Student st;
jj j = &st; //j为指向结构体地址的指针
j->sid=99;
printf("%d",j->sid);
return 0;
}
typedef的用法
最新推荐文章于 2020-10-14 14:54:15 发布