template<class type> struct _binary_search_tree
{
	type key;
	struct _binary_search_tree* parent;
	struct _binary_search_tree* left_child;
	struct _binary_search_tree* right_child;
};

template<class type>void tree_insert(_binary_search_tree<type>** tree, type key);

int main()
{
       	char number[10];	

        _binary_search_tree<char*> root;

        tree_insert(&root, number);
}

compile error:
755.c:182: error: no matching function for call to ‘tree_insert(_binary_search_tree<char*>*, char [10])’

Thanks.

_binary_search_tree<char*> *root;
 tree_insert(&root, number);

I wonder how would a function work without a definition.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.