c++笔记1--typedef
一.typedef
1.定义一种类型的别名
int main()
{
typedef char* PCHAR;
PCHAR pa,pb;
pa = "hello";
pb = "hello";
return 0;
}
2.定义结构体别名
typedef struct tagPOINT1
{
int x;
int y;
}POINT;
POINT p1;
3.为复杂的声明定义一个简单的别名
typedef int (*A) (char, char);
原创
2021-03-25 15:20:46 ·
206 阅读 ·
0 评论