草庐IT

c++ - 奇怪的类重新定义错误

我有一个奇怪的错误,说我的类正在重新定义,源于我的Node类中的friend声明。这是我当前的代码:templateclassNode{private:Tval;Node*next;public:friendclassOList;};任何我的其他类(class):templateclassOList{------>Errorhereprivate:Node*head;intsize;public:OList();OList(constOList&b);~OList();clear();intsize();TtGet(intinput);intcount(Tinput);insert(T