linked list

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • souravmania
    New Member
    • Oct 2006
    • 1

    linked list

    Implementation of linked list n displaying d list
  • dariophoenix
    New Member
    • Oct 2006
    • 34

    #2
    Here's a headstart:

    Code:
    //linkedlist.h
    #ifndef LINKED_LIST_H
    #define LINKED_LIST_H
    
    template <class Element>
    class LinkedList{
       struct Link{
           Element* data;
           Link* next;
           Link(Element* dat, Link* nxt): data(dat), next(nxt) {}
       }  *head, *cur;   
    public:
       LinkedList() : head(0), cur(0) {}
       ~LinkedList();
       // Other methods you need
    }
    
    #endif

    Comment

    Working...