Thread: Doubly Linked List Node

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    109

    Doubly Linked List Node

    Hey i'm trying to create a header file for a doubly linked list node. So far i have
    Code:
    #ifndef DLLISTNODE_H
    #define DLLISTNODE_H
    #include <iostream>
    
    using namespace std;
    
    template <class T>
    class DLListNode
    {
        public:
                     DLListNode();
                     DLListNode(const T&)
                     DLListNode(const T&, DLListNode<T>*
                     ~DLListNode();
                     void set(data, nextPtr, prevPtr)
                     void retrieve(data)
    
        private:
                     T data;
                     DLListNode<T>* nextPtr;
                     DLListNode<T>*prevPtr;
    };
    #include "DLListNode.template"
    #endif
    can someone let me know if any of this is right. The Set funtion is supposed to set the private data members, the retreive is supposed to retreive the private data members. And I need a constructor that allows a node to be immediately linked into a list. I have them in there just not sure if they are right.
    Last edited by DarkDot; 04-15-2007 at 11:10 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help Debugging my AVL tree program.
    By Nextstopearth in forum C Programming
    Replies: 2
    Last Post: 04-04-2009, 01:48 AM
  2. Reverse function for linked list
    By Brigs76 in forum C++ Programming
    Replies: 1
    Last Post: 10-25-2006, 10:01 AM
  3. question about a working linked list
    By cold_dog in forum C++ Programming
    Replies: 23
    Last Post: 09-13-2006, 01:00 AM
  4. Linked list probs
    By mouse163 in forum C++ Programming
    Replies: 5
    Last Post: 02-19-2005, 05:41 PM
  5. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 10:21 PM