【发布时间】:2020-10-19 06:10:31
【问题描述】:
遍历链表直到temp!=NULL(用于遍历链表的临时变量)和temp->next!=NULL有什么区别?
while(temp!=NULL)
{
cout<<temp->data;
temp=temp->next;
}
while(temp->next!=NULL)
{
cout<<tmep->data;
temp=temp->next;
}
【问题讨论】:
标签: pointers data-structures linked-list