首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

Typedef struct list node这是什么意思,该怎么处理

2013-11-23 
Typedef struct list node这是什么意思...typedef struct list nodetypedef node *linkvoid main(){link

Typedef struct list node这是什么意思
Typedef struct list node这是什么意思,该怎么处理


...
typedef struct list node;
typedef node *link;
void main()
{
   link ptr,head;
...

不太懂
typedef struct list node;
typedef node *link;
还有后面直接为啥可以直接定义 link ptr,head指针?
[解决办法]
typedef struct list node;
 typedef node *link;
 void main() {  
  link ptr,head; 
}
typedef 就是把类型从命名

node p;
相当于
struct list p;

typdef node * link;
相当于
struct list * p;
[解决办法]
node 相当于 struct list的替换
link 相当于 node*
双重替换 就是
struct list *

热点排行