数据结构学习(C++)——单链表(定义与实现)[7]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 happycock 的 blog

              else

              {

                     return null;

              }

       }

 

       void insert(const type &value)//在当前节点的后面插入节点,不改变current

       {

              node<type> *p = new node<type>(value, current->link);

              current->link = p;

       }

 

       bool insertbefore(const type &value)//在当前节点的前面插入一节点,不改变current,改变prior

       {

              node<type> *p = new node<type>(value);

              if (prior != null)

              {

                     p->link = current;

本文关键:数据结构 C++ 单链表
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top