我正在尝试定义一个类
class BTree
{
private:
map<std::string,BTree*> *node;
public:
BTree(void);
~BTree(void);
void Insert(BTree *);
};
在编译代码时,编译器给了我一个错误
error C2899: typename cannot be used outside a template declaration
error C2143: syntax error : missing ';' before '<'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2238: unexpected token(s) preceding ';'
error C2899: typename cannot be used outside a template declaration
我试图将地图更改为简单的东西,就像map<int,int> node
它仍然给我同样的错误一样。我错过了什么吗?