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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!