I get an error if I include the "~Binary_tree()" destructor. But when I remove it, everything compiles.
My node.h file
template<class T>
class Binary_tree
{
private:
void insert(T val, Node<T> *ptr);
Node<T> *search(T val, Node<T> *ptr);
Node<T> *root;
public:
Binary_tree()
{
root = NULL;
}
~Binary_tree();
void insert(T val);
Node<T> *search(T val);
};
my main.cc
#include<iostream>
#include "node.h"
using namespace std;
int main()
{
Binary_tree<char> tree;
return 0;
}