Update Node.hpp

main
p68710245 1 year ago
parent 896be325cb
commit eadc3eba10

@ -15,12 +15,12 @@ public:
: info{data}, link{nullptr} {} // 生成一般结点的构造函数
Node(const Node &) = delete;
Node &operator=(const Node &) = delete;
void InsertAfter(Node<T> *p) // 在当前结点后插入一个结点
void insert_after(Node<T> *p) // 在当前结点后插入一个结点
{
p->link = link;
link = p;
}
Node<T> *RemoveAfter() // 删除当前结点的后继结点并返回其地址
Node<T> *remove_after() // 删除当前结点的后继结点并返回其地址
{
if (link) // 判断节点后是否有节点
{

Loading…
Cancel
Save