Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template <class T>
- QueueList<T>::QueueList(const QueueList<T>& src)
- {
- head_ = new Node(src.head_->value_, nullptr, nullptr);
- Node* unit1 = head_;
- Node* unit2 = src.head_;
- Node* ptr = head_;
- while (ptr != nullptr)
- {
- unit2 = unit2->next_;
- unit1->next_ = new Node(unit2->value_, nullptr, unit1);
- unit1 = unit1->next_;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement