Could someone tell me how to fix this error at the static BSTree <DT>
words line. I get a type name expected and declaration terminated
incorectly error.
I've tried adding different data types but it only gets worse.
#ifndef BSTree_H
#define BSTree_H
template<class DT>
class BSTree
{
template <class DT>
class TNode
{
TNode *right;
TNode *left;
public:
DT *info;
friend class BSTree;
};
TNode *root;
void Insert_rec(TNod e *&temp, DT *info);
void Print_rec(TNode *);
public:
void Insert(DT *);
void Print(void);
};
static BSTree <DT> words;
#endif
words line. I get a type name expected and declaration terminated
incorectly error.
I've tried adding different data types but it only gets worse.
#ifndef BSTree_H
#define BSTree_H
template<class DT>
class BSTree
{
template <class DT>
class TNode
{
TNode *right;
TNode *left;
public:
DT *info;
friend class BSTree;
};
TNode *root;
void Insert_rec(TNod e *&temp, DT *info);
void Print_rec(TNode *);
public:
void Insert(DT *);
void Print(void);
};
static BSTree <DT> words;
#endif
Comment