hello
how can I display the all items in the linked list?
thnks.
hello
how can I display the all items in the linked list?
thnks.
Depends on what the list is storing. Also what is the linked list runing in(windows enviorment or dos box).
struct NODE
{
int 1;
NODE *next;
};
main
{
NODE *head=0;
displaylist(head);
return();
}
void displaylist(NODE* &head)
{
NODE *node=head;
for(node;node;node->next)
{
cout<<node->int<<endl;
}
return;
}
<^>( * ; * )<^>