http://zhedahht.blog.163.com/blog/static/254111742007112255248202/
struct Listnode { int m_Key; Listnode *m_Next; }; void DeleteNode(Listnode *head, Listnode *deletenode) { if (!head || !deletenode) return ; if (deletenode->m_pNext) { Listnode *p = deletenode->m_Next; deletenode->m_Key = p->m_Key; deletenode->m_Next = p->m_Next; delete p; p = nullptr; } else { Listnode *p = head; while (p->m_Next != deletenode) p = p->m_Next; p->m_Next = nullptr; delete deletenode; deletenode = nullptr; } }