Thread: linked list

  1. #1
    gatli
    Guest

    linked list

    hello

    how can I display the all items in the linked list?

    thnks.

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    25
    Depends on what the list is storing. Also what is the linked list runing in(windows enviorment or dos box).

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    22
    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;
    }
    <^>( * ; * )<^>

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ Linked list program need help !!!
    By dcoll025 in forum C++ Programming
    Replies: 1
    Last Post: 04-20-2009, 10:03 AM
  2. Following CTools
    By EstateMatt in forum C Programming
    Replies: 5
    Last Post: 06-26-2008, 10:10 AM
  3. Reverse function for linked list
    By Brigs76 in forum C++ Programming
    Replies: 1
    Last Post: 10-25-2006, 10:01 AM
  4. Template Class for Linked List
    By pecymanski in forum C++ Programming
    Replies: 2
    Last Post: 12-04-2001, 09:07 PM
  5. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 10:21 PM