invalid conversion from ‘BinaryNode<int>*’ to ‘int’
Helo,
the compiler gives strange error messages by one of my classe's methods, and i'm not sure of the cause.
1 2 3 4 5 6 7 8 9 10
|
template <class T>
void BinarySearchTree<T>::Rebalance(BinaryNode<T> ** _Root)
{
BinaryNode<T> * pointer2;
/*Other stuff here*/
pointer2 = ((*_Root) -> Parent); //Parent is of type BinaryNode<T> *
_Root = &pointer2;
}
| |
I'm getting this error message by the line "pointer2 = ((*_Root) -> Parent);" :
error: invalid conversion from ‘BinaryNode<int>*’ to ‘int’
Another error by the line "_Root = &pointer2;" :
error: cannot convert ‘BinaryNode<int>*’ to ‘BinaryNode<int>**’ in assignment
*_Root=(*_Root)->Parent;
Topic archived. No new replies allowed.