0
之前預期的類名稱我在C++中出現'{'token'之前的預期類名「。我試圖將avlTree類繼承到單詞搜索類中,但它不起作用。在'{'令牌錯誤
#ifndef WORDSEAR_H
#define WORDSEAR_H
#include <string>
#include "avlTree.h"
class wordSearch: public avlTree
{ <----error right here
public:
//functions are here
private:
};
#endif
這是avlTree.h
#ifndef AVLTREE_H
#define AVLTREE_H
template <class myType>
struct nodeType {
myType keyValue;
nodeType<myType> *left;
nodeType<myType> *right;
};
template <class myType>
class avlTree
{
public:
//functions are here
private:
};
#endif