cout << temp->name << endl; temp = temp->link; while(temp->link != NULL) { cout << " | | " << temp->name << endl; temp = temp->link; }