bool List::ListInsertHead(Node *pNode)函數(shù)中倒數(shù)第二行和倒數(shù)第三行
bool List::ListInsertHead(Node *pNode)函數(shù)中倒數(shù)第二行和倒數(shù)第三行可以寫成下面代碼嗎
newNode=m_pList->next;
temp=newNode->next;
bool List::ListInsertHead(Node *pNode)函數(shù)中倒數(shù)第二行和倒數(shù)第三行可以寫成下面代碼嗎
newNode=m_pList->next;
temp=newNode->next;
2019-01-30
舉報
2019-03-24
你可自己測試一下
2019-03-24
應(yīng)該不可,因為這樣的話,m_pList->next中的原有的會丟失