text cover

Data Abstraction and Problem Solving with C++

Walls and Mirrors

by Frank M. Carrano

Addison Wesley Logo

c04p219.cpp

Go to the documentation of this file.
00001 
00016 // display the data in a circular linked list;
00017 // list points to its last node
00018 if (list != NULL)
00019 {  // list is not empty
00020    Node *first = list->next; // point to first node
00021 
00022    Node *cur = first;        // start at first node
00023    // Loop invariant: cur points to next node to
00024    // display
00025    do
00026    {  display(cur->item);      // write data portion
00027       cur = cur->next;         // point to next node
00028    } while (cur != first);     // list traversed?
00029 }  // end if

Generated on Sun Aug 27 13:05:37 2006 for AWLogo by  doxygen 1.4.6