找回密码
 用户注册

QQ登录

只需一步,快速开始

查看: 4249|回复: 0

ACE_Unbounded_Set_Ex<T, C>::insert_tail (const T &item)请教

[复制链接]
发表于 2012-5-22 15:01:13 | 显示全部楼层 |阅读模式
  1. template <class T, class C> int
  2. ACE_Unbounded_Set_Ex<T, C>::insert_tail (const T &item)
  3. {
  4.   // ACE_TRACE ("ACE_Unbounded_Set_Ex<T, C>::insert_tail");
  5.   NODE *temp = 0;
  6.   // Insert <item> into the old dummy node location.
  7.   this->head_->item_ = item;
  8.   // Create a new dummy node.
  9.   ACE_NEW_MALLOC_RETURN (temp,
  10.                          static_cast<NODE*> (this->allocator_->malloc (sizeof (NODE))),
  11.                          NODE (this->head_->next_),
  12.                          -1);
  13.   // Link this pointer into the list.
  14.   this->head_->next_ = temp;
  15.   // Point the head to the new dummy node.
  16.   this->head_ = temp;
  17.   ++this->cur_size_;
  18.   return 0;
  19. }
复制代码
这个函数做的是插入节点的动作,但是总感觉不对,请高手指点,这个链表的Head是在哪里的啊
您需要登录后才可以回帖 登录 | 用户注册

本版积分规则

Archiver|手机版|小黑屋|ACE Developer ( 京ICP备06055248号 )

GMT+8, 2024-5-2 10:58 , Processed in 0.019673 second(s), 6 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表