typedef的使用
#include <stdio.h>
struct Test
{
int a;
};
//定义一个结构体变量
struct Test obj;
//给struct Test2类型起一个别名叫Test2
typedef struct Test2
{
int a;
}Test2;
Test2 tmp;
//给struct Test2
int main(int argc, char const *argv[])
{
//1、typede给一个存在的类型起一个别名
//2、typedef不能创建新的类型
//给int起一个别名叫int64
typedef int int64;//有分号
int64 a;//int a;//宏定义发生在预处理
//typedef是在编译阶段
return 0;
}