- template <class T, class C> int
- ACE_Unbounded_Set_Ex<T, C>::insert_tail (const T &item)
- {
- // ACE_TRACE ("ACE_Unbounded_Set_Ex<T, C>::insert_tail");
- NODE *temp = 0;
- // Insert <item> into the old dummy node location.
- this->head_->item_ = item;
- // Create a new dummy node.
- ACE_NEW_MALLOC_RETURN (temp,
- static_cast<NODE*> (this->allocator_->malloc (sizeof (NODE))),
- NODE (this->head_->next_),
- -1);
- // Link this pointer into the list.
- this->head_->next_ = temp;
- // Point the head to the new dummy node.
- this->head_ = temp;
- ++this->cur_size_;
- return 0;
- }
复制代码 这个函数做的是插入节点的动作,但是总感觉不对,请高手指点,这个链表的Head是在哪里的啊 |