c++ - Binary tree search doesn't work -


template<class t> class tree {   public:     tree(treenode *rootptr = null)     {         this->rootptr = rootptr;     };     treenode<t> *search(string x);     bool insert(t x);     treenode * remove(t x);     treenode *getroot(){ return rootptr; };     tree getleftsubtree(); tree getrightsubtree();     bool isempty(){ return rootptr == null; };  private:     treenode<t> *rootptr; }; 

i error

c2955: 'treenode' : use of class template requires template argument list 

the treenode class is:

template <class t> class treenode{     t data; // different data type other apps     treenode<t> *left; // pointer left child     treenode<t> *right; // pointer right child   public:     treenode(t x = 0, treenode *left = null,treenode *right = null)     {         data = x;         this->left = left;         this->right = right;     };     t getdata() { return data; };     treenode<t> *getleft() { return left; };     treenode<t> *getright() { return right; };     void setdata(t x) { data = x; };     void setleft(treenode *ptr) { left = ptr; };     void setright(treenode *ptr) { right = ptr; };     template<class t> friend class tree; };   

i appended code treenode class posted here question - tonyd