实际上就算从头结点开始循环也没问题吧?
Node* CurrentNode = m_pList;
while (CurrentNode->next != nullptr)
{
if (CurrentNode == pCurrentNode)
{
pNextNode->data = CurrentNode->next->data;
return true;
}
CurrentNode = CurrentNode->next;
}
return false;