| 482 | |
| 483 | |
| 484 | void list::print() const |
| 485 | { |
| 486 | |
| 487 | #ifdef DL_LIST |
| 488 | |
| 489 | element* iter=start->next; |
| 490 | |
| 491 | #endif // DL_LIST |
| 492 | |
| 493 | #ifdef SL_LIST |
| 494 | |
| 495 | element *iter=start; |
| 496 | |
| 497 | #endif // SL_LIST |
| 498 | |
| 499 | if(iter==NULL) |
| 500 | { |
| 501 | cerr<<"\nWARNING: void list::print() const:\ncannot print corrupt list" |
| 502 | <<endl; |
| 503 | return; |
| 504 | } |
| 505 | |
| 506 | while(iter->next!=NULL) |
| 507 | { |
| 508 | iter->entry->print(); |
| 509 | iter=iter->next; |
| 510 | } |
| 511 | } |
| 512 | |
| 513 | |
| 514 |