【数据结构】 单向链表

【1】错误:H->next =NULL 或其他“让指针指向空”的语句运行报错:“ 'NULL' : undeclared identifier”  、 “ '=' : cannot convert from 'int' to 'struct node *'  ”

原因:未引入头文件 #include “stdio.h”  ,把NULL定义为一个空地址是在 stdio头文件中完成的。

【2】

scanf("%d",c)

printf("位置为:")

printf语句的内容死活无法显示

原因:将scanf(“%d”,c)改为 scanf(“%d”,&c)

猜你喜欢

转载自www.cnblogs.com/versionk/p/10583329.html