I wrote an AVL Tree template class... its all working except for every I did
something like:
if (element < newElement)
else if (element newElement)
and so on, obviously that'll work for every type that has an overriden <, >
and = operator... but wont work for stuff like char*, it'll compare the
address instead of the actual data...
I'm assuming the correct way to fix this is to provide some way for the user
to pass in a comparison function? what is a clean way to do that?