SH
Size: a a a
SH
SI
s
s
s
s
push_back(pCurrent->data)
в цикле - вроде такогоSI
SI
SI
SI
SI
s
for(auto pCurrent = other.head; pCurrent != nullptr; pCurrent = pCurrent->pNext)
VQ
SI
template<typename T>
SinglyLinkedList<T>::SinglyLinkedList(const SinglyLinkedList& other)
{
SinglyLinkedList<T> bufList;
bufList.size = other.size;
Node<T> *current = other.head;
bufList.head = new SinglyLinkedList(other.head);
while (current->pNext != nullptr)
{
bufList.push_back(current->data);
current = current->pNext;
}
}
C
template<typename T>
SinglyLinkedList<T>::SinglyLinkedList(const SinglyLinkedList& other)
{
SinglyLinkedList<T> bufList;
bufList.size = other.size;
Node<T> *current = other.head;
bufList.head = new SinglyLinkedList(other.head);
while (current->pNext != nullptr)
{
bufList.push_back(current->data);
current = current->pNext;
}
}
SI
s
SH
template<typename T>
SinglyLinkedList<T>::SinglyLinkedList(const SinglyLinkedList& other)
{
SinglyLinkedList<T> bufList;
bufList.size = other.size;
Node<T> *current = other.head;
bufList.head = new SinglyLinkedList(other.head);
while (current->pNext != nullptr)
{
bufList.push_back(current->data);
current = current->pNext;
}
}
s
bufList.head = new SinglyLinkedList(other.head);
это что такое?SH
template<typename T>
SinglyLinkedList<T>::SinglyLinkedList(const SinglyLinkedList& other)
{
SinglyLinkedList<T> bufList;
bufList.size = other.size;
Node<T> *current = other.head;
bufList.head = new SinglyLinkedList(other.head);
while (current->pNext != nullptr)
{
bufList.push_back(current->data);
current = current->pNext;
}
}
template<typename T>
SinglyLinkedList<T>::SinglyLinkedList(const SinglyLinkedList& other)
{
size = other.size;
Node<T> *current = other.head;
head = new SinglyLinkedList(other.head);
while (current->pNext != nullptr)
{
push_back(current->data);
current = current->pNext;
}
}