#include class Node { public: int data; std::shared_ptr next; }; class LinkedList { public: LinkedList() { head = nullptr; } void deleteNode(int n) { std::shared_ptr temp = head, prev; if (n == 1) { head
用c++写一个class 删除链表的第N个节点,并且用智能指针写
猜你喜欢
转载自blog.csdn.net/weixin_35748962/article/details/129563788
今日推荐
周排行