- 顶一下, 下班后试试
- DoublyLinkedList<T>::insert 逻辑完全是错误的。
析构函数也是错误的。 - ; *p=head;
while(p->next!=NULL)
{
p=p->next;
}
p=list->head; ---疑问:应该是 p->next = list->head 吧
}
list->head=NULL;//设置单链表为空,否则运行出错 ---疑问:为什么? 我测试也碰到同样的问题
}... - t;_value << std::endl;
#endif
delete pDel;
pDel = NULL;
if(NULL == _pFront->_pNext)//是最后一个节点
{
break;
}
}
delete _pFront;
_pFront = NULL;
}...










