The for
loop that displays the report also contains no counting
variable:
for (; !train.endp ( ) ; train.advance ( )) {...}
The test expression merely checks current_link_pointer
; if it is the
null pointer, there is no next element, in which case the for
loop
terminates. The increment expression advances the list after the current
element is processed.