LocateElem()这样写也可以吧?
Node* CurrentNode = m_pList;
for (int i = 0; i < m_iLength; i++)
{
CurrentNode = CurrentNode->next;
if (CurrentNode->data == pNode->data)
return i;
}
return -1;
Node* CurrentNode = m_pList;
for (int i = 0; i < m_iLength; i++)
{
CurrentNode = CurrentNode->next;
if (CurrentNode->data == pNode->data)
return i;
}
return -1;
2020-02-22
举报