research of list-new.pptVIP

  • 4
  • 0
  • 约1.48万字
  • 约 43页
  • 2016-11-28 发布于河南
  • 举报
research of list-new

{ link_type cur = (link_type) node-next; while (cur != node) { link_type tmp = cur; cur = (link_type) cur-next; destroy_node(tmp); } Member function clear() Delete all the elements except the last one. void listT, Alloc::clear() A B C node cur tmp cur destroy_node(tmp) tmp cur destroy_node(tmp) destroy_node(tmp) tmp cur cur == node return 1: link_type tmp = create_node(x); 2: tmp-next = position.node; 3: tmp-prev = position.node-prev; 4: (position.node-prev)-next = tmp; 5: position-prev = tmp; By invoking function “iterator

文档评论(0)

1亿VIP精品文档

相关文档