00001 // Print out the elements of list "in" 00002 void print(List& in) { 00003 if (in.isEmpty()) cout << "()\n"; 00004 else { 00005 in.setFirst(); 00006 cout << "( " << in.currValue(); 00007 in.next(); 00008 while (in.isInList()) { 00009 cout << ", " << in.currValue(); 00010 in.next(); 00011 } 00012 cout << " )\n"; 00013 } 00014 }