I do not under stand how to get NODE to work. Worked fine with typedef struct but when I changed to template stopped working???

template<typename T>
struct Node 
{
	struct Node(T data)
	{
		this->data = data;
		previous = NULL;
		next = NULL;
	}
	T data;
	struct Node *previous;
	struct Node *next;
} NODE; 


 

template<typename T>
class LinkedList
{
protected:
	NODE *head;
	NODE *tail;

Tried removing struct from line 4. Still get the same error. The problem is with NODE on line 13. I get the error "C2143: syntax error : missing ';' before 'identifier'" however when I did it the first time with typedef struct no problems. is there a different way that I should be declaring NODE

template< typename T > struct Node 
{
	/*struct*/ Node( T data )
	{
		this->data = data;
		previous = NULL;
		next = NULL;
	}
	T data;
	/*struct*/ Node *previous; // keyword struct is superfluous here
	/*struct*/ Node *next;
} /*NODE*/ ; 

template< typename T > class LinkedList
{
    protected:
	/*NODE*/ Node<T>* head;
	/*NODE*/ Node<T>* tail;
};

Edited 5 Years Ago by vijayan121: n/a

This question has already been answered. Start a new discussion instead.