User Profile
Collapse
-
Yeah, that's where I was confused. Thanks for the response!... -
Please disregard this post. It turns out I was confusing the values of the pointers and the values of the nodes they are pointing to. The example makes sense now.Leave a comment:
-
Linked Lists and Copy Constructor
Hello,
I'm still very new to C++ and have encountered some trouble in understanding how exactly the copy constructor for a stack class (given as an example in the book I've been learning from) using a linked list works.
The interface for the classes:
Code:template<class T> class Node { public: Node(T theData, Node<T>* theLink) : data(theData), link(theLink){}
No activity results to display
Show More
Leave a comment: