
please wait
|
|
_last->_next = new Node(x, nullptr); //Problem line
_last= new Node(x, nullptr);
clone
function, if you really have to allow copy semantics on your class then i bet you'd rather change that definition of you class cnstor to copying the values themselves else objects that are copies of others will be invalidated when the ~dstructor is run on any one of them;