-1
我有一个我的链接列表显示功能的问题。该功能如下。问题与显示功能
我只是在switch语句之一中调用函数。但没有任何显示。请帮我弄清楚我错在哪里。
代码:
void display()
{
data *cur_point;
cur_point = head;
if(cur_point = NULL)
{
printf("The list is empty");
}
else
{
while(cur_point != NULL)
{
printf("Name : %s \n Contact Number : %d \n",cur_point->name,cur_point->telno);
cur_point = cur_point -> nextp;
}
}
}
请编译你的程序时使用最大编译器警告并查看编译器警告并尝试修复它们,它们可以帮助你找出像这样的错误 –