This code is not compiling in my system; I'm using Eclipse.
// Linked list head
template<class T>
struct Node
{
    // constructor
    Node(const T& a) : pNext(NULL), data(a) {}
    Node* pNext; //link
    T data;
}; // end of header
// List code
#include <iostream>
#include "LinkedList.h"
template<class T>
class linkedList
{
public:
    typedef Node<T> Node;
    //constructor creates empty list
    linkedList() : pHead(NULL), size(0) {}
~linkedList()
{
    Node* pIter = pHead;
    while(pIter != NULL)
    {
        Node* pNext = pIter->pNext;
        delete pIter;
        pIter = pNext;
    }
}
void insert(const T& data)
{
    Node* pInsert = new Node(data);
    if(pHead == NULL)
    {
        pHead = pInsert;
    }
    else
    {
        pInsert->pNext = pHead;
        pHead = pInsert;
    }
}
private:
    Node* pHead; // always points to head of list
    unsigned int size; // stores number of elements in list
};
Here is the error message:
./LinkedList.cpp:14:18: error: declaration of 'typedef struct Node<T> linkedList<T>::Node'
../LinkedList.h:4:1: error: changes meaning of 'Node' from 'struct Node<T>'
make: *** [LinkedList.o] Error 1
 
     
     
    