Tools.h++ Manual
10-6 104011 Tandem Computers Incorporated
10
Here's a line-by-line description of the program:
1. The
RWFileManager
has been constructed with an old File.
2. The member function
start()
returns the offset to the first space ever
allocated in the file. In this case, that space will contain an offset to the
start of the linked-list.
3. Read the offset to the first link.
4. A loop to read through the linked-list and print each entry.
5. Seek to the next link.
6. Read the next link.
7. Print the integer.
8. Get the offset to the next link.
9. The destructor for class
RWFileManager
, which closes the file, will be
called here.