Simple error that I can't figure out.

I am getting an error but I do not know why. But it should be a simple fix but I am just not seeing it.

Function:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
template<typename generic>
void BST<generic>::insert(generic x)
{
	if(m_size == 0)
	{
		m_data = new BTN<generic>;
		m_data -> data = x;     // error here
		m_data -> p = NULL;
		m_data -> r = NULL; 
		m_data -> l = NULL;
		m_size++;
	}

}


error:
bst.hpp:20: error: invalid conversion from âintâ to âint

If you need to see more please let me know.
Topic archived. No new replies allowed.