I am trying to make a linked list in C++ using Generics. But when I declare a Node object inside my class I get this error library.h:7:3: error: 'Node' does not name a type Node<T> n;
template <typename T>
class LinkedList{
public:
int length;
Node<T> n;
LinkedList(){
}
};
template <typename T>
class Node{
public:
int value;
Node *next;
Node(int value){
this->value = value;
}
};