Lab 5

The file Lab05_list.cpp contains the declarations needed for a simple linked list class. Your job is to implement the constructors and member functions. The file Lab05_testList.cpp contains a program that you can use to test your implementation. You will need to supply a data file containing a list of numbers.

The Address Of Operator &

The first and next functions return a pointer to the information stored in a node (assuming that the node pointer is not NULL). That is, they return the address at which that information is stored. (Later on, we'll write a find function that also returns a pointer to the information stored in a node.) The address of operator (&) returns the address of its operand. For example, if n is an integer variable, &n is the location in memory in which the value of n is stored.

Suppose ptr is a non-NULL pointer to a node. The address of the information field is given by &(ptr->info) which is the address of the information field in the node pointed to by ptr.

File Submission

Send me your completed Lab05_list.cpp file as an email attachment. It is not necessary to send me the test program because I already have it.