从此处实例化
|
我有一个“从这里实例化”的问题。
template <typename E>
class tree
{
public:
tree(){root=0;}
void addAVL( const E &data) throw(bad_alloc);
private:
class Node
{
public:
E data;
Noeud * left;
Noeud * right;
int high;
std::string adHier;
Noeud( const E&d ): data( d right( 0 ),left( 0 ),high(0), adHier(\"\") { }
};
Node * root;
};
#include \"AVL.inl\"
/*-------------------------
*in my inl
*/
template <typename E>
void tree<E>::addAVL( const E &data) throw(bad_alloc)
{
// if the trre is empty
if ( root == 0 )
{
root = new Node(data); // HERE my error when in a cpp I call addAVL
}
}
我的错误是:
../AVL.inl:98: instantiated from ‘void AVL_Lab10::tree<E>::addAVL(const E&) [with E = int]’
../TestingAVL.cpp:30: instantiated from here
没有找到相关结果
已邀请:
2 个回复
钨蜡唤喉晤
我猜应该是
而不是
?如果您纠正这些错别字,是否可以解决您的错误?
补蹲农界维