typedef:定义类型,给一种数据类型起别名;
typedef unsigned long long int uint 64;//uint64就是unsigned long long int;
typedef int Arr[10];//Arr是整型数组类型;
typedef intPint;//Pint==int;
int main()
{
uint64 a=1000;
printf("%d\n",a);//1000
Pint p1=&a;//等同于int*p1;
}
typedef int(*p)[4];//指针类型;
typedef struct A
{
int a;
char b;
}A;//A==struct A;
typedef的使用
最新推荐文章于 2023-09-09 17:01:03 发布