<<But this would leave you with the inability to look for a block that is 12k
or larger. You'd only be able to search for blocks that are exactly 12k if
I'm not mistaken. Or is there a call to look for a key or larger?>>

Check out the files I posted on my AOL space:

http://members.aol.com/yennie/rbtree.c
http://members.aol.com/yennie/rbtree.h

They implement balanced trees with a "FindClosest" function which returns the 
entry with the closest (but at least as large) value.

You could use these as is, or you could easily wrap a C++ class around them 
so that you could use assignment operators and such instead of function calls.

They also have multimap functionality- multiple entries allowed with the same 
key without any slowdown. And you can always tweak the source to do 
specialized tasks.

Brian

Reply via email to