不能直接判断链表结点的next指针是否为空,if( l1->nextNULL),还应该判断该节点是否存在。例如:if( l1!=NULL && l1->nextNULL)
刷leetcode时遇到member access within null pointer of type ‘ListNode‘
最新推荐文章于 2023-04-11 21:33:01 发布
不能直接判断链表结点的next指针是否为空,if( l1->nextNULL),还应该判断该节点是否存在。例如:if( l1!=NULL && l1->nextNULL)