詰まった
template<class Object>
class BinarySearchTree
{
public:
explicit BinarySearchTree(const Object & notFound);
~BinarySearchTree();
const Object &find(const Object &x) const;
const Object &findMin() const;
bool isEmpty() const;
void insert(const Object &x);
void remove(const Object &x);
void makeEmpty();
void printTree();
private:
BinaryNode<Object> *root;
const Object ITEM_NOT_FOUND;
const Object &dataAt(BinaryNode<Object> *t) const;
void insert(const Object &x, BinaryNode<Object> *&t) const;
void remove(const Object &x, BinaryNode<Object> *&t) const;
BinaryNode<Object> *find(const Object &x,
BinaryNode<Object> *t) const;
BinaryNode<Object> *findMin(BinaryNode<Object> *t) const;
void makeEmpty(BinaryNode<Object> *&t) const;
void printTree(BinaryNode<Object> *t)const; // post-order
}// end class
コンパイルしたら
”宣言が正しく終了されていない”
なんですが、どして?
プ板にも置いてきましたが、
「どれどれ私に任せてみなさい」
って方がいらっしゃいましたら
コードをお送りします。
やばいなしかし。
時間が足りない。
終わり。
class BinarySearchTree
{
public:
explicit BinarySearchTree(const Object & notFound);
~BinarySearchTree();
const Object &find(const Object &x) const;
const Object &findMin() const;
bool isEmpty() const;
void insert(const Object &x);
void remove(const Object &x);
void makeEmpty();
void printTree();
private:
BinaryNode<Object> *root;
const Object ITEM_NOT_FOUND;
const Object &dataAt(BinaryNode<Object> *t) const;
void insert(const Object &x, BinaryNode<Object> *&t) const;
void remove(const Object &x, BinaryNode<Object> *&t) const;
BinaryNode<Object> *find(const Object &x,
BinaryNode<Object> *t) const;
BinaryNode<Object> *findMin(BinaryNode<Object> *t) const;
void makeEmpty(BinaryNode<Object> *&t) const;
void printTree(BinaryNode<Object> *t)const; // post-order
}// end class
コンパイルしたら
”宣言が正しく終了されていない”
なんですが、どして?
プ板にも置いてきましたが、
「どれどれ私に任せてみなさい」
って方がいらっしゃいましたら
コードをお送りします。
やばいなしかし。
時間が足りない。
終わり。