Question: Need help implementing a copy constructor for a doubly linked stack. class DLinkedStack : public StackInterface { private : Node *headPtr; // Pointer to first
Need help implementing a copy constructor for a doubly linked stack.
class DLinkedStack : public StackInterface{ private: Node *headPtr; // Pointer to first node in the chain; Node *topPtr; // Pointer to (last) node in the chain that contains the stack's top
templateDLinkedStack ::DLinkedStack() : headPtr(nullptr), topPtr(nullptr) { } //default constructor template DLinkedStack ::DLinkedStack(const DLinkedStack &aStack) { //code } //copy constructor
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
