Question: Implement the default constructor for the LinkedList class . Remember, the default constructor 's job is to create an empty list. In this version of
Implement the default constructor for the LinkedList class . Remember, the default constructor 's job is to create an empty list.
In this version of Node, we are using a struct with members int data and Node *next.
You code will be inserted outside the class . So your header will be LinkedList::LinkedList() .
My INCORRECT answer was this:
.LinkedList::LinkedList() { int data; struct Node *next; };
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
