我正在尝试使用泛型在C ++中创建链接列表。但是,当我在类中声明Node对象时,出现此错误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;
}
};