s
template<typename T>
SinglyLinkedList<T>::SinglyLinkedList(const SinglyLinkedList &other)
{
this->size = other.size;
this->head = other.head;
Node<T>* current = this->head;
while (current->pNext != nullptr)
{
Node<T>* newcar = new Node<T>;
newcar->data = other->data;
newcar->pNext = other->pNext; current = current->pNext;
}
}