Here is my code:
class BinaryTree<T> { private node<T> Head; public class node<T> { public T Data; public node<T> right; public node<T> left; public node<T> parent; ... } ... private void insert(ref T data, node<T> parent, ref node<T> currentChild) { ... { if (currentChild.Data >= data) insert(ref data, currentChild, ref currentChild.right); else insert(ref data, currentChild, ref currentChild.left); } } }
Above, at the point if (currentChild.Data >= data) , an error appears:
The operator '> =' cannot be applied to operands of type 'T' and 'T'
What do I need to do to fix the error?
source share