美好的一天......我想制作一个链接列表以在 C++ 中从最后一个到第一个显示列表,因为 ii 添加 29->36->15->1 我想成为 1->15->36->29 喜欢这是我通常做的
void DisplayNormal()
{
linkedlist *temp;
temp = head;
while (temp->next != NULL)
{
cout << "list Number : " << temp->ListNum << endl;
cout << "Student Ceel Phone : " << temp->number << endl;
cout << "-------------------------------" << endl;
temp = temp->next;
}
if (temp->next == NULL)
{
cout << "list Number : " << temp->ListNum << endl;
cout << "Student Ceel Phone : " << temp->number << endl;
cout << "-------------------------------" << endl;
}
}