对struct typedef *的认识

typedef struct node {
………
}NODE,*PNODE;

应该等价于

typedef struct node NODE;//struct node = NODE,eg:struct node n; <==> NODE n;其中n为node型非指针变量
typedef struct node* PNODE//struct node* = PNODE,eg:struct node* a; <==>  PNODE a;其中a为node型指针变量

其中PNODE是指向NODE的指针类型.

posted @ 2019-10-08 21:34  心媛意码  阅读(199)  评论(0编辑  收藏  举报