CS 2500 Spring 2011
Lab 5

Pointer-Based Implementation of a Linked List

We want  to better understand how to use pointers in C++ and linked lists. The section of our text that covers this starts on page 205. Your task is to write two programs:

1. Create a linked list to store integer values.

2. Write a program that opens the file "numbers.txt", creates a pointer-based linked list and places the integers into the node items in order. After you close the input file, use a for loop to print out the values in the list.

3. Your script should include:
    g++ listToFile.cpp
    more numbers.txt
    g++ fileToList.cpp

What to Submit

Name your files:

Turn in your programs and script to the CS Homework Submission System at
             Choose instructor:  cs2500mm
             Choose course: CS2500
             Choose assignment: Lab5