📅  最后修改于: 2022-03-11 14:44:47.600000             🧑  作者: Mango
//make sure you have access to the first node in the list
for (Node *ptr = first; ptr != nullptr; ptr = ptr->next) {
cout << ptr->data << " ";
}