Last updated 6 years ago
新增一個指向head的指針
當指針不指向NULL時
指針 = 指針 -> next
void display(struct Node *first) { Node *list = first; while(list) { cout << list->data << " "; list = list->next; } cout << endl; }